Try a shorter path length limit for long filenames in file sync
Might fix some errors on non-English Windows systems
This commit is contained in:
parent
2725e43b13
commit
06d29fc4da
1 changed files with 5 additions and 2 deletions
|
@ -1154,7 +1154,10 @@ Zotero.Sync.Storage = new function () {
|
|||
|
||||
if (windowsLength) {
|
||||
var pathLength = destFile.path.length - destFile.leafName.length;
|
||||
var newLength = 254 - pathLength;
|
||||
// Limit should be 255, but a shorter limit seems to be
|
||||
// enforced for nsIZipReader.extract() below on
|
||||
// non-English systems
|
||||
var newLength = 240 - pathLength;
|
||||
// Require 40 available characters in path -- this is arbitrary,
|
||||
// but otherwise filenames are going to end up being cut off
|
||||
if (newLength < 40) {
|
||||
|
@ -1166,7 +1169,7 @@ Zotero.Sync.Storage = new function () {
|
|||
}
|
||||
}
|
||||
else {
|
||||
var newLength = 254;
|
||||
var newLength = 240;
|
||||
}
|
||||
|
||||
// Shorten file if it's too long -- we don't relink it, but this should
|
||||
|
|
Loading…
Reference in a new issue