Check ext length explicitly in createShortened when checking path length
This commit is contained in:
parent
2a986c8635
commit
48955c8983
|
@ -354,7 +354,8 @@ Zotero.File = new function(){
|
|||
let pathLength = pathByteLength - fileNameByteLength;
|
||||
newLength -= pathLength;
|
||||
|
||||
if (newLength < 5) {
|
||||
// Make sure there's a least 1 character of the basename left over
|
||||
if (newLength - ext.length < 1) {
|
||||
throw new Error("Path is too long");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user