Skip to content

Commit 9944539

Browse files
committed
Fix directory_toggle issue
1 parent b64f2c6 commit 9944539

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lua/neo-tree/sources/filesystem/lib/fs_scan.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ local dir_complete = function(context, dir_path)
7373
end
7474

7575
local job_complete = function(context)
76-
print("ASYNC JOB COMPLETE!!!")
7776
local state = context.state
7877
local root = context.root
7978
local parent_id = context.parent_id
@@ -140,7 +139,6 @@ end
140139

141140
local function get_children_async(path, callback)
142141
uv.fs_opendir(path, function(_, dir)
143-
print("Async cb of: " .. path)
144142
uv.fs_readdir(dir, function(_, stats)
145143
local children = {}
146144
if stats then
@@ -174,7 +172,6 @@ local function scan_dir_sync(context, path)
174172
end
175173

176174
local function scan_dir_async(context, path, callback)
177-
process_node(context, path)
178175
get_children_async(path, function(children)
179176
for _, child in ipairs(children) do
180177
create_node(context, child)
@@ -189,6 +186,7 @@ local function scan_dir_async(context, path, callback)
189186
end
190187
end
191188
end
189+
process_node(context, path)
192190
callback(path)
193191
end)
194192
end
@@ -215,7 +213,7 @@ local function async_scan(context, path)
215213
)
216214
else -- scan_mode == "shallow"
217215
-- prepend the root path
218-
table.insert(context.paths_to_load, 1, path)
216+
-- table.insert(context.paths_to_load, 1, path)
219217

220218
context.directories_scanned = 0
221219
context.directories_to_scan = #context.paths_to_load

0 commit comments

Comments
 (0)