From 49f93a9c3eee20a6d078e4a56655efb03d28f04d Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Sat, 20 Sep 2025 00:05:03 +0200 Subject: [PATCH] simply symlink handling --- src/search.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/search.rs b/src/search.rs index 9d2a15b..14840df 100644 --- a/src/search.rs +++ b/src/search.rs @@ -146,7 +146,9 @@ impl IconSearch { .flatten() // merge all the iterators .flatten() // remove Err entries .filter_map(|entry| Some((entry.file_type().ok()?, entry))) // get file type for each entry and skip if fail - .partition::, _>(|(ft, _)| ft.is_dir()); + .partition::, _>(|(ft, entry)| { + ft.is_dir() || (!entry.path().extension().is_some() && ft.is_symlink()) + }); // icons at the top-level in a base_dir don't belong to a theme, but must still be able to be found! let files = files @@ -564,5 +566,4 @@ mod test { let icon = locations.standalone_icon("htop").unwrap(); assert_eq!(icon.path.file_name(), Some("htop.png".as_ref())) } - }