Skip to content

Commit 58d7467

Browse files
authored
Fix lack of icon assignation when extension don't match capitalization (lowercase) (#3810)
- **PR Description** The extension icon map contain all extensions on lowercase, when a file don't have extension on lowercase the string don't match and icon is not assigned.
2 parents a3560eb + cb53e37 commit 58d7467

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/gui/presentation/icons/file_icons.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package icons
22

33
import (
44
"path/filepath"
5+
"strings"
56
)
67

78
// NOTE: Visit next links for inspiration:
@@ -728,7 +729,7 @@ func IconForFile(name string, isSubmodule bool, isLinkedWorktree bool, isDirecto
728729
return icon
729730
}
730731

731-
ext := filepath.Ext(name)
732+
ext := strings.ToLower(filepath.Ext(name))
732733
if icon, ok := extIconMap[ext]; ok {
733734
return icon
734735
}

0 commit comments

Comments
 (0)