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:
parent
26f0fb0609
commit
c04e49e218
1 changed files with 1 additions and 0 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue