find recursively relative to the theme directory

This commit is contained in:
Kay0u 2020-06-18 15:20:11 +02:00
parent 20de3f5f37
commit b5a1d8dfed
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D

View file

@ -272,7 +272,7 @@ end
function scandir(directory, callback) function scandir(directory, callback)
-- use find (and not ls) to list only files recursively and with their full path relative to the asked directory -- 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 for filename in pfile:lines() do
callback(filename) callback(filename)
end end