Skip to content

Commit 7abec5e

Browse files
committed
fix(sshfs): use stat to get the filetype when fs_scandir does not return the type
1 parent d311c22 commit 7abec5e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/nvim-tree/populate.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,13 @@ function M.populate(entries, cwd, parent_node)
290290
local name, t = luv.fs_scandir_next(handle)
291291
if not name then break end
292292

293-
if not should_ignore(utils.path_join({cwd, name})) then
293+
local abs = utils.path_join({cwd, name})
294+
if not should_ignore(abs) then
295+
if not t then
296+
local stat = luv.fs_stat(abs)
297+
t = stat and stat.type
298+
end
299+
294300
if t == 'directory' then
295301
table.insert(dirs, name)
296302
elseif t == 'file' then

0 commit comments

Comments
 (0)