commit a737f2c2aa7927d605523d4941cf7ce5577a91b0
parent 226928f1e98f71934a497fefac9df515eb79e9d1
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 21 Oct 2014 13:03:52 -0400
Treat 260-character paths as too long on Windows
I understood the path limit to mean >260, but a user is seeing the error
with a 260-character path [1], so let's try this.
[1] https://forums.zotero.org/discussion/41410
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js
@@ -332,7 +332,10 @@ Zotero.File = new function(){
let fileNameByteLength = Zotero.Utilities.Internal.byteLength(file.leafName);
// Windows API only allows paths of 260 characters
- if (e.name == "NS_ERROR_FILE_NOT_FOUND" && pathByteLength > 260) {
+ //
+ // I think this should be >260 but we had a report of an error with exactly
+ // 260 chars: https://forums.zotero.org/discussion/41410
+ if (e.name == "NS_ERROR_FILE_NOT_FOUND" && pathByteLength >= 260) {
Zotero.debug("Path is " + file.path);
pathError = true;
}