www

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

commit a2f2182357d001ab6ba66860438cf6952d5092e2
parent ec9b1bed376ff5d48edef0d2a53cf05a8991907f
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun,  1 Nov 2009 21:21:43 +0000

Add previous changes to non-ZIP section as well


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

diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js @@ -795,10 +795,21 @@ Zotero.Sync.Storage = new function () { if (e.name == "NS_ERROR_FILE_NOT_FOUND" && destFile.path.length > 255) { windowsLength = true; } - // ext3/ext4/HFS+ have a filename length limit of ~254 characters - else if (e.name == "NS_ERROR_FAILURE" && destFile.leafName.length >= 254) { + // ext3/ext4/HFS+ have a filename length limit of ~254 bytes + // + // These filenames will almost always be ASCII ad files, + // but allow an extra 10 bytes anyway + else if (e.name == "NS_ERROR_FAILURE" && destFile.leafName.length >= 244) { nameLength = true; } + // ecrypt (on Ubuntu, at least) can result in a lower limit -- + // not much we can do about this, but log a warning + else if (e.name == "NS_ERROR_FAILURE" && Zotero.isLinux && destFile.leafName.length > 130) { + var msg = "Error creating file '" + destFile.leafName + "' " + + "(Are you using filesystem encryption such as ecrypt " + + "that results in a filename length limit below 255 bytes?)"; + Components.utils.reportError(msg); + } if (windowsLength || nameLength) { // Preserve extension