www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 06d29fc4da827c73f6e523bdb7e6a2937b6100cf
parent 2725e43b1301692b2bfe67e5449bb7a3d5b31bef
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 28 Feb 2012 02:08:55 -0500

Try a shorter path length limit for long filenames in file sync

Might fix some errors on non-English Windows systems

Diffstat:
Mchrome/content/zotero/xpcom/storage.js | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js @@ -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