convert file ext to lowercase for format detection

To ensure proper file format detection with case-insensitive file
systems.
This commit is contained in:
ryenus 2024-08-05 09:52:50 +08:00
parent b80e1cb35e
commit 570986485f

View File

@ -112,7 +112,7 @@ func FormatStringFromFilename(filename string) string {
GetLogger().Debugf("checking file extension '%s' for auto format detection", filename)
nPos := strings.LastIndex(filename, ".")
if nPos > -1 {
format := filename[nPos+1:]
format := strings.ToLower(filename[nPos+1:])
GetLogger().Debugf("detected format '%s'", format)
return format
}