util.findFiles: Don't die on broken symlinks (#7829)

pull/7834/head
NiLuJe 3 years ago committed by GitHub
parent dccd49b652
commit 1b852d1842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -699,7 +699,8 @@ function util.findFiles(dir, cb)
if not ok then return end
for f in iter, dir_obj do
local path = current.."/"..f
local attr = lfs.attributes(path)
-- lfs can return nil here, as it will follow symlinks!
local attr = lfs.attributes(path) or {}
if attr.mode == "directory" then
if f ~= "." and f ~= ".." then
scan(path)

Loading…
Cancel
Save