From 98f372eddd1a68e5967504fb103fdafd120c24f2 Mon Sep 17 00:00:00 2001 From: kiyan Date: Sat, 7 Aug 2021 20:24:48 +0200 Subject: [PATCH] hotfix: refresh with sshfs --- lua/nvim-tree/populate.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/nvim-tree/populate.lua b/lua/nvim-tree/populate.lua index 00ced840..656a4791 100644 --- a/lua/nvim-tree/populate.lua +++ b/lua/nvim-tree/populate.lua @@ -185,7 +185,13 @@ function M.refresh_entries(entries, cwd, parent_node) if not name then break end num_new_entries = num_new_entries + 1 - if not should_ignore(utils.path_join({cwd, name})) then + local abs = utils.path_join({cwd, name}) + if not should_ignore(abs) then + if not t then + local stat = luv.fs_stat(abs) + t = stat and stat.type + end + if t == 'directory' then table.insert(dirs, name) new_entries[name] = true