mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Fix: read files from symlink directory in background selector menu (#5524)
* Fix: read files from symlink directory in background selector menu * safely parse the path to avoid option injection * Simply use -L flag with find to resolve symlinks
This commit is contained in:
@@ -46,7 +46,7 @@ function GetEntries()
|
||||
|
||||
for _, wallpaper_dir in ipairs(dirs) do
|
||||
local handle = io.popen(
|
||||
"find " .. ShellEscape(wallpaper_dir)
|
||||
"find -L " .. ShellEscape(wallpaper_dir)
|
||||
.. " -maxdepth 1 -type f \\( -name '*.jpg' -o -name '*.jpeg' -o -name '*.png' -o -name '*.gif' -o -name '*.bmp' -o -name '*.webp' \\) 2>/dev/null | sort"
|
||||
)
|
||||
if handle then
|
||||
|
||||
Reference in New Issue
Block a user