fix(wallpapers): follow symlinks when scanning wallpaper directories

On NixOS, /run/current-system/sw/share/backgrounds lists all wallpapers
installed on the system. The folder entries are symbolic links to the actual
PNG files (each in a dedicated nix store path). Previously WalkDir would skip
over these, resulting in cosmic-settings displaying an empty wallpaper list.

By following symbolic links, the list is now properly populated.
This commit is contained in:
Tony Wasserka 2026-04-11 13:40:27 +02:00 committed by Michael Murphy
parent 26f0fb0609
commit c04e49e218

View file

@ -104,6 +104,7 @@ pub async fn load_each_from_path(
) -> Pin<Box<dyn Send + Stream<Item = (PathBuf, RgbaImage, RgbaImage)>>> {
let candidate_paths: Vec<_> = WalkDir::new(path)
.max_depth(3)
.follow_links(true)
.into_iter()
.filter_map(Result::ok)
.filter(|entry| entry.file_type().is_file())