1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 10:41:03 +02:00

fix(images): incorrectly resolving non-files

This commit is contained in:
Jake Stanger 2023-02-01 21:05:58 +00:00
parent e83618b1d6
commit 51d2c2279f
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -74,7 +74,7 @@ impl<'a> ImageProvider<'a> {
}) })
} }
Some(input_type) => Err(Report::msg(format!("Unsupported image type: {input_type}"))), Some(input_type) => Err(Report::msg(format!("Unsupported image type: {input_type}"))),
None if PathBuf::from(input_name).exists() => { None if PathBuf::from(input_name).is_file() => {
Ok(ImageLocation::Local(PathBuf::from(input_name))) Ok(ImageLocation::Local(PathBuf::from(input_name)))
} }
None => get_desktop_icon_name(input_name).map_or_else( None => get_desktop_icon_name(input_name).map_or_else(