Don't collect reason statistics for reason none Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
parent
b652dbd0e0
commit
a4dd5ad5c8
@ -46,22 +46,24 @@ local function populate_children(handle, cwd, node, git_status, parent)
|
|||||||
local type = stat and stat.type or nil
|
local type = stat and stat.type or nil
|
||||||
|
|
||||||
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] then
|
if filter_reason == FILTER_REASON.none then
|
||||||
local child = nil
|
if not nodes_by_path[abs] then
|
||||||
if type == "directory" and vim.loop.fs_access(abs, "R") then
|
local child = nil
|
||||||
child = builders.folder(node, abs, name, stat)
|
if type == "directory" and vim.loop.fs_access(abs, "R") then
|
||||||
elseif type == "file" then
|
child = builders.folder(node, abs, name, stat)
|
||||||
child = builders.file(node, abs, name, stat)
|
elseif type == "file" then
|
||||||
elseif type == "link" then
|
child = builders.file(node, abs, name, stat)
|
||||||
local link = builders.link(node, abs, name, stat)
|
elseif type == "link" then
|
||||||
if link.link_to ~= nil then
|
local link = builders.link(node, abs, name, stat)
|
||||||
child = link
|
if link.link_to ~= nil then
|
||||||
|
child = link
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if child then
|
||||||
|
table.insert(node.nodes, child)
|
||||||
|
nodes_by_path[child.absolute_path] = true
|
||||||
|
explorer_node.update_git_status(child, node_ignored, git_status)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
if child then
|
|
||||||
table.insert(node.nodes, child)
|
|
||||||
nodes_by_path[child.absolute_path] = true
|
|
||||||
explorer_node.update_git_status(child, node_ignored, git_status)
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
for reason, value in pairs(FILTER_REASON) do
|
for reason, value in pairs(FILTER_REASON) do
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user