From 21f712c3252581668c8d8c3ba7575aa060385a1d Mon Sep 17 00:00:00 2001 From: Tushar Chauhan Date: Fri, 1 May 2026 20:01:02 +0530 Subject: [PATCH] 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 --- default/elephant/omarchy_background_selector.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default/elephant/omarchy_background_selector.lua b/default/elephant/omarchy_background_selector.lua index 7954266f..38bc2bf1 100644 --- a/default/elephant/omarchy_background_selector.lua +++ b/default/elephant/omarchy_background_selector.lua @@ -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