Skip to content

Commit

Permalink
fix suffixe match filename
Browse files Browse the repository at this point in the history
  • Loading branch information
d1y committed Apr 25, 2024
1 parent 1a27016 commit e56bf38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/file_icons/src/file_icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ impl FileIcons {
// FIXME: Associate a type with the languages and have the file's language
// override these associations
maybe!({
// If `filename`` can be found directly in `suffixes`
if let Some(type_str) = this.suffixes.get(path.file_name()?.to_str()?) {
return this.get_type_icon(type_str);
}
let suffix = path.icon_stem_or_suffix()?;

if let Some(type_str) = this.stems.get(suffix) {
Expand Down

0 comments on commit e56bf38

Please sign in to comment.