Skip to content

Commit 9298c1b

Browse files
yehuohancseickel
andauthored
fix(filesystem): use getftype to check symlink on windows (#1252)
Co-authored-by: cseickel <cseickel@gmail.com>
1 parent 230ff11 commit 9298c1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lua/neo-tree/sources/common/file-items.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ function create_item(context, path, _type, bufnr)
117117
path = path,
118118
type = _type,
119119
}
120+
if utils.is_windows then
121+
if vim.fn.getftype(path) == "link" then
122+
item.type = "link"
123+
end
124+
end
120125
if item.type == "link" then
121126
item.is_link = true
122127
item.link_to = vim.loop.fs_realpath(path)

0 commit comments

Comments
 (0)