diff --git a/data/core/dirwatch.lua b/data/core/dirwatch.lua index 2bcf5508..2dac59f3 100644 --- a/data/core/dirwatch.lua +++ b/data/core/dirwatch.lua @@ -202,7 +202,9 @@ function dirwatch.get_directory_files(dir, root, path, t, entries_count, recurse if recurse_pred(dir, f.filename, entries_count, t_elapsed) then local _, complete, n = dirwatch.get_directory_files(dir, root, f.filename, t, entries_count, recurse_pred) recurse_complete = recurse_complete and complete - entries_count = n + if n ~= nil then + entries_count = n + end else recurse_complete = false end