From bb46ca0c4d6d6a1b18b28760bdd913a000f47c14 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 22 Mar 2025 11:24:56 +1100 Subject: [PATCH] chore: fix incorrect definition of vim.loop.fs_lstat --- lua/nvim-tree/explorer/init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/nvim-tree/explorer/init.lua b/lua/nvim-tree/explorer/init.lua index c42ffe07..f2f498b5 100644 --- a/lua/nvim-tree/explorer/init.lua +++ b/lua/nvim-tree/explorer/init.lua @@ -214,8 +214,9 @@ function Explorer:reload(node, project) end local abs = utils.path_join({ cwd, name }) - ---@type uv.fs_stat.result|nil - local stat = vim.loop.fs_lstat(abs) + + -- path incorrectly specified as an integer + local stat = vim.loop.fs_lstat(abs) ---@diagnostic disable-line param-type-mismatch local filter_reason = self.filters:should_filter_as_reason(abs, stat, filter_status) if filter_reason == FILTER_REASON.none then @@ -373,8 +374,9 @@ function Explorer:populate_children(handle, cwd, node, project, parent) if Watcher.is_fs_event_capable(abs) then local profile = log.profile_start("populate_children %s", abs) - ---@type uv.fs_stat.result|nil - local stat = vim.loop.fs_lstat(abs) + -- path incorrectly specified as an integer + local stat = vim.loop.fs_lstat(abs) ---@diagnostic disable-line param-type-mismatch + local filter_reason = parent.filters:should_filter_as_reason(abs, stat, filter_status) if filter_reason == FILTER_REASON.none and not nodes_by_path[abs] then local child = node_factory.create({