This commit is contained in:
committed by
GitHub
parent
c5fba1ec18
commit
049cdd3073
@@ -41,8 +41,18 @@ function M.reload(node, status)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local stat
|
||||||
|
local function fs_stat_cached(path)
|
||||||
|
if stat ~= nil then
|
||||||
|
return stat
|
||||||
|
end
|
||||||
|
|
||||||
|
stat = uv.fs_stat(path)
|
||||||
|
return stat
|
||||||
|
end
|
||||||
|
|
||||||
local abs = utils.path_join { cwd, name }
|
local abs = utils.path_join { cwd, name }
|
||||||
t = t or (uv.fs_stat(abs) or {}).type
|
t = t or (fs_stat_cached(abs) or {}).type
|
||||||
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) then
|
||||||
child_names[abs] = true
|
child_names[abs] = true
|
||||||
|
|
||||||
@@ -73,10 +83,12 @@ function M.reload(node, status)
|
|||||||
table.insert(node.nodes, link)
|
table.insert(node.nodes, link)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
local n = nodes_by_path[abs]
|
local n = nodes_by_path[abs]
|
||||||
if n then
|
if n then
|
||||||
n.executable = builders.is_executable(abs, n.extension or "")
|
n.executable = builders.is_executable(abs, n.extension or "")
|
||||||
|
n.fs_stat = fs_stat_cached(abs)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user