0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.1.1473: new resolve() implementation causes problem for plugins

Problem:    New resolve() implementation causes problem for plugins.
Solution:   Only resolve a resparse point after checking it is needed. (Ken
            Takata, closes #4492)
This commit is contained in:
Bram Moolenaar
2019-06-06 12:22:41 +02:00
parent 61da1bfa6c
commit 4a792c87b9
3 changed files with 45 additions and 0 deletions

View File

@@ -276,6 +276,7 @@ func Test_resolve_win32()
" test for symbolic link to a file
new Xfile
wq
call assert_equal('Xfile', resolve('Xfile'))
silent !mklink Xlink Xfile
if !v:shell_error
call assert_equal(s:normalize_fname(getcwd() . '\Xfile'), s:normalize_fname(resolve('./Xlink')))
@@ -333,11 +334,14 @@ func Test_resolve_win32()
" test for reparse point
call mkdir('Xdir')
call assert_equal('Xdir', resolve('Xdir'))
silent !mklink /D Xdirlink Xdir
if !v:shell_error
w Xdir/text.txt
call assert_equal('Xdir/text.txt', resolve('Xdir/text.txt'))
call assert_equal(s:normalize_fname(getcwd() . '\Xdir\text.txt'), s:normalize_fname(resolve('Xdirlink\text.txt')))
call assert_equal(s:normalize_fname(getcwd() . '\Xdir'), s:normalize_fname(resolve('Xdirlink')))
call delete('Xdirlink')
else
echomsg 'skipped test for reparse point'
endif