fix(explorer): reload executable stat (#1427)
This commit is contained in:
@@ -23,7 +23,7 @@ function M.folder(parent, absolute_path, name)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function is_executable(absolute_path, ext)
|
function M.is_executable(absolute_path, ext)
|
||||||
if M.is_windows then
|
if M.is_windows then
|
||||||
return utils.is_windows_exe(ext)
|
return utils.is_windows_exe(ext)
|
||||||
end
|
end
|
||||||
@@ -35,7 +35,7 @@ function M.file(parent, absolute_path, name)
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
absolute_path = absolute_path,
|
absolute_path = absolute_path,
|
||||||
executable = is_executable(absolute_path, ext),
|
executable = M.is_executable(absolute_path, ext),
|
||||||
extension = ext,
|
extension = ext,
|
||||||
fs_stat = uv.fs_stat(absolute_path),
|
fs_stat = uv.fs_stat(absolute_path),
|
||||||
name = name,
|
name = name,
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ function M.reload(node, status)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local n = nodes_by_path[abs]
|
||||||
|
if n then
|
||||||
|
n.executable = builders.is_executable(abs, n.extension)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user