This commit is contained in:
parent
ad0b95dee5
commit
210478677c
@ -35,12 +35,14 @@ local function populate_children(handle, cwd, node, git_status, parent)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local abs = utils.path_join { cwd, name }
|
local abs = utils.path_join { cwd, name }
|
||||||
|
|
||||||
|
if Watcher.is_fs_event_capable(abs) then
|
||||||
local profile = log.profile_start("explore populate_children %s", abs)
|
local profile = log.profile_start("explore populate_children %s", abs)
|
||||||
|
|
||||||
---@type uv.fs_stat.result|nil
|
---@type uv.fs_stat.result|nil
|
||||||
local stat = vim.loop.fs_stat(abs)
|
local stat = vim.loop.fs_stat(abs)
|
||||||
local filter_reason = parent.filters:should_filter_as_reason(abs, stat, filter_status)
|
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] and Watcher.is_fs_event_capable(abs) then
|
if filter_reason == FILTER_REASON.none and not nodes_by_path[abs] then
|
||||||
local child = nil
|
local child = nil
|
||||||
if t == "directory" and vim.loop.fs_access(abs, "R") then
|
if t == "directory" and vim.loop.fs_access(abs, "R") then
|
||||||
child = builders.folder(node, abs, name, stat)
|
child = builders.folder(node, abs, name, stat)
|
||||||
@ -68,6 +70,7 @@ local function populate_children(handle, cwd, node, git_status, parent)
|
|||||||
log.profile_end(profile)
|
log.profile_end(profile)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
---@param node Node
|
---@param node Node
|
||||||
---@param status table
|
---@param status table
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user