diff options
author | Tanner Babcock <babkock@protonmail.com> | 2022-05-06 05:00:09 +0000 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2022-06-12 11:52:38 +0530 |
commit | 7cfeff6e1007284c566e20b009240a164ae17b2e (patch) | |
tree | 1fb9c0aaf97a24f209d6cddf70ae54580bee2b95 | |
parent | b7de869572d245299d4135a8493fa4308b9460e1 (diff) |
See if this fixes Windows tests
-rw-r--r-- | src/icon.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/icon.rs b/src/icon.rs index 4982399..874ff3e 100644 --- a/src/icon.rs +++ b/src/icon.rs @@ -59,6 +59,7 @@ impl Icons { // Check file types let file_type: FileType = name.file_type(); + let icon = if let FileType::Directory { .. } = file_type { self.default_folder_icon } else if let FileType::SymLink { is_dir: true } = file_type { @@ -89,12 +90,17 @@ impl Icons { icon } else if let FileType::File { exec: true, .. } = file_type { // If file has no extension and is executable - "\u{f489}" // "" + if cfg!(not(target_os = "windows")) { + "\u{f489}" // "" + } else { + self.default_file_icon + } } else { // Use the default icons. self.default_file_icon }; + format!("{}{}", icon, self.icon_separator) } |