Added in check in case of nil.

This commit is contained in:
Adam Harrison 2022-04-03 16:20:48 -04:00 committed by Guldoman
parent c0970f41c0
commit d323917538
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 3 additions and 1 deletions

View File

@ -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