@@ -73,7 +73,6 @@ local dir_complete = function(context, dir_path)
7373end
7474
7575local 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
140139
141140local 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)
174172end
175173
176174local 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 )
194192end
@@ -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