Check ext length explicitly in createShortened when checking path length
This commit is contained in:
parent
2a986c8635
commit
48955c8983
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue