Add empty directory icons
This commit is contained in:
committed by
Kiyan
parent
7531c7023d
commit
25b414051f
@@ -15,6 +15,9 @@ local path_to_matching_str = require'lib.utils'.path_to_matching_str
|
||||
local function dir_new(cwd, name)
|
||||
local absolute_path = cwd..'/'..name
|
||||
local stat = luv.fs_stat(absolute_path)
|
||||
local handle = luv.fs_opendir(absolute_path, nil, 1)
|
||||
local children = luv.fs_readdir(handle)
|
||||
luv.fs_closedir(handle)
|
||||
return {
|
||||
name = name,
|
||||
absolute_path = absolute_path,
|
||||
@@ -23,6 +26,7 @@ local function dir_new(cwd, name)
|
||||
match_name = path_to_matching_str(name),
|
||||
match_path = path_to_matching_str(absolute_path),
|
||||
open = false,
|
||||
empty = children == nil,
|
||||
entries = {}
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user