Merge pull request #168 from YunoHost/fix-custom_overlay

find recursively relative to the theme directory
This commit is contained in:
Alexandre Aubin 2020-06-18 15:23:21 +02:00 committed by GitHub
commit 4a17d3216a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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