#1059 protect against duplicates (#1143)

This commit is contained in:
Alexander Courtis
2022-04-09 22:59:38 +10:00
committed by GitHub
parent deb1f253f4
commit 1bdef08cfa
3 changed files with 15 additions and 10 deletions

View File

@@ -21,9 +21,14 @@ local function populate_children(handle, cwd, node, status)
break
end
local nodes_by_path = utils.key_by(node.nodes, "absolute_path")
local abs = utils.path_join { cwd, name }
t = get_type_from(t, abs)
if not filters.should_ignore(abs) and not filters.should_ignore_git(abs, status.files) then
if
not filters.should_ignore(abs)
and not filters.should_ignore_git(abs, status.files)
and not nodes_by_path[abs]
then
if t == "directory" and uv.fs_access(abs, "R") then
table.insert(node.nodes, builders.folder(abs, name, status, node_ignored))
elseif t == "file" then