diff --git a/access.lua b/access.lua index 7c51cd1..a7443bd 100644 --- a/access.lua +++ b/access.lua @@ -272,7 +272,7 @@ end function scandir(directory, callback) -- use find (and not ls) to list only files recursively and with their full path relative to the asked directory - local pfile = io.popen('find "'..directory..'" -type f -printf \"%f\n\"') + local pfile = io.popen('find "'..directory..'" -type f -exec realpath --relative-to "'..directory..'" {} \\;') for filename in pfile:lines() do callback(filename) end