fix(#1520): file type changes are not detected. (#1521)

This commit is contained in:
Sebastian Volland
2022-08-22 03:41:11 +02:00
committed by GitHub
parent 81eb718394
commit c5fba1ec18
2 changed files with 15 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ function M.folder(parent, absolute_path, name)
local has_children = handle and uv.fs_scandir_next(handle) ~= nil
return {
type = "directory",
absolute_path = absolute_path,
fs_stat = uv.fs_stat(absolute_path),
group_next = nil, -- If node is grouped, this points to the next child dir/link node
@@ -34,6 +35,7 @@ function M.file(parent, absolute_path, name)
local ext = string.match(name, ".?[^.]+%.(.*)") or ""
return {
type = "file",
absolute_path = absolute_path,
executable = M.is_executable(absolute_path, ext),
extension = ext,
@@ -61,6 +63,7 @@ function M.link(parent, absolute_path, name)
end
return {
type = "link",
absolute_path = absolute_path,
fs_stat = uv.fs_stat(absolute_path),
group_next = nil, -- If node is grouped, this points to the next child dir/link node