Skip to content

Commit

Permalink
Fix lack of icon assignation when extension don't match capitalizatio…
Browse files Browse the repository at this point in the history
…n (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.
  • Loading branch information
stefanhaller authored Aug 9, 2024
2 parents a3560eb + cb53e37 commit 58d7467
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/gui/presentation/icons/file_icons.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package icons

import (
"path/filepath"
"strings"
)

// NOTE: Visit next links for inspiration:
Expand Down Expand Up @@ -728,7 +729,7 @@ func IconForFile(name string, isSubmodule bool, isLinkedWorktree bool, isDirecto
return icon
}

ext := filepath.Ext(name)
ext := strings.ToLower(filepath.Ext(name))
if icon, ok := extIconMap[ext]; ok {
return icon
}
Expand Down

0 comments on commit 58d7467

Please sign in to comment.