diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-04-06 14:00:38 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-04-12 02:28:38 -0400 |
commit | 7c8122f36d219ab5aaea1b772e301cf1cff80cce (patch) | |
tree | a8cbda0efbd9a1b67e519f2c356cfc73a2b8c560 | |
parent | 49e86cebf0341f0aa2da5ca9d530ee2bebe6606e (diff) | |
download | rneovim-7c8122f36d219ab5aaea1b772e301cf1cff80cce.tar.gz rneovim-7c8122f36d219ab5aaea1b772e301cf1cff80cce.tar.bz2 rneovim-7c8122f36d219ab5aaea1b772e301cf1cff80cce.zip |
win: getftype(symlink) returns 'link'
Vim doesn't detect symlinks correctly so stick with Neovim's behaviour.
-rw-r--r-- | runtime/doc/eval.txt | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_stat.vim | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 11c4b62403..5b2fcbde3d 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4208,8 +4208,7 @@ getftype({fname}) *getftype()* getftype("/home") < Note that a type such as "link" will only be returned on systems that support it. On some systems only "dir" and - "file" are returned. On MS-Windows a symbolic link to a - directory returns "dir" instead of "link". + "file" are returned. *getline()* getline({lnum} [, {end}]) diff --git a/src/nvim/testdir/test_stat.vim b/src/nvim/testdir/test_stat.vim index 1239fe9427..0a09130b0c 100644 --- a/src/nvim/testdir/test_stat.vim +++ b/src/nvim/testdir/test_stat.vim @@ -86,7 +86,7 @@ func Test_win32_symlink_dir() let res = system('dir C:\Users /a') if match(res, '\C<SYMLINKD> *All Users') >= 0 " Get the filetype of the symlink. - call assert_equal('dir', getftype('C:\Users\All Users')) + call assert_equal('link', getftype('C:\Users\All Users')) endif endif endfunc |