added extra extension length normalization
This commit is contained in:
parent
e7ebbd1343
commit
3df868f72a
|
@ -177,6 +177,10 @@ func normalizeName(fr FileReader, name string) string {
|
||||||
// try to detect the extension from the file content
|
// try to detect the extension from the file content
|
||||||
cleanExt, _ = detectExtension(fr)
|
cleanExt, _ = detectExtension(fr)
|
||||||
}
|
}
|
||||||
|
if extLength := len(cleanExt); extLength > 20 {
|
||||||
|
// keep only the last 20 characters (it is multibyte safe after the regex replace)
|
||||||
|
cleanExt = "." + cleanExt[extLength-20:]
|
||||||
|
}
|
||||||
|
|
||||||
// name
|
// name
|
||||||
// ---
|
// ---
|
||||||
|
|
Loading…
Reference in New Issue