Skip to content

Commit

Permalink
Scan ROM extensions case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
sergystepanov committed Feb 20, 2024
1 parent 41bfe4f commit 1452317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/games/library.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (lib *library) set(games []GameMetadata) {
}

func (lib *library) isExtAllowed(path string) bool {
ext := filepath.Ext(path)
ext := strings.ToLower(filepath.Ext(path))
if ext == "" {
return false
}
Expand All @@ -246,7 +246,7 @@ func (lib *library) isExtAllowed(path string) bool {
// getMetadata returns game info from a path
func getMetadata(path string, basePath string) GameMetadata {
name := filepath.Base(path)
ext := filepath.Ext(name)
ext := strings.ToLower(filepath.Ext(name))
relPath, _ := filepath.Rel(basePath, path)

return GameMetadata{
Expand Down

0 comments on commit 1452317

Please sign in to comment.