Scan ROM extensions case-insensitive

This commit is contained in:
Sergey Stepanov 2024-02-20 21:39:49 +03:00
parent 41bfe4f4d3
commit 1452317d45
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B

View file

@ -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
}
@ -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{