Skip to content

Commit

Permalink
Merge pull request #83 from fawni/fix/dir-icon-priority
Browse files Browse the repository at this point in the history
fix: check filetype before extension
  • Loading branch information
solidiquis authored Mar 18, 2023
2 parents 9905785 + d2adf3e commit 8f4b698
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/render/tree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ impl Node {

let path = self.symlink_target_path().unwrap_or_else(|| self.path());

if let Some(icon) = path.extension().and_then(icon_from_ext) {
if let Some(icon) = self.file_type().and_then(icon_from_file_type) {
return Some(self.stylize(icon));
}

if let Some(icon) = self.file_type().and_then(icon_from_file_type) {
if let Some(icon) = path.extension().and_then(icon_from_ext) {
return Some(self.stylize(icon));
}

Expand Down

0 comments on commit 8f4b698

Please sign in to comment.