Skip to content

Commit bb46ca0

Browse files
committed
chore: fix incorrect definition of vim.loop.fs_lstat
1 parent 3a27e36 commit bb46ca0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lua/nvim-tree/explorer/init.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ function Explorer:reload(node, project)
214214
end
215215

216216
local abs = utils.path_join({ cwd, name })
217-
---@type uv.fs_stat.result|nil
218-
local stat = vim.loop.fs_lstat(abs)
217+
218+
-- path incorrectly specified as an integer
219+
local stat = vim.loop.fs_lstat(abs) ---@diagnostic disable-line param-type-mismatch
219220

220221
local filter_reason = self.filters:should_filter_as_reason(abs, stat, filter_status)
221222
if filter_reason == FILTER_REASON.none then
@@ -373,8 +374,9 @@ function Explorer:populate_children(handle, cwd, node, project, parent)
373374
if Watcher.is_fs_event_capable(abs) then
374375
local profile = log.profile_start("populate_children %s", abs)
375376

376-
---@type uv.fs_stat.result|nil
377-
local stat = vim.loop.fs_lstat(abs)
377+
-- path incorrectly specified as an integer
378+
local stat = vim.loop.fs_lstat(abs) ---@diagnostic disable-line param-type-mismatch
379+
378380
local filter_reason = parent.filters:should_filter_as_reason(abs, stat, filter_status)
379381
if filter_reason == FILTER_REASON.none and not nodes_by_path[abs] then
380382
local child = node_factory.create({

0 commit comments

Comments
 (0)