Skip to content

Commit 8f4b698

Browse files
authored
Merge pull request solidiquis#83 from fawni/fix/dir-icon-priority
fix: check filetype before extension
2 parents 9905785 + d2adf3e commit 8f4b698

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/render/tree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ impl Node {
197197

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

200-
if let Some(icon) = path.extension().and_then(icon_from_ext) {
200+
if let Some(icon) = self.file_type().and_then(icon_from_file_type) {
201201
return Some(self.stylize(icon));
202202
}
203203

204-
if let Some(icon) = self.file_type().and_then(icon_from_file_type) {
204+
if let Some(icon) = path.extension().and_then(icon_from_ext) {
205205
return Some(self.stylize(icon));
206206
}
207207

0 commit comments

Comments
 (0)