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
This commit is contained in:
Dan Stillman 2014-10-21 13:03:52 -04:00
parent 226928f1e9
commit a737f2c2aa

View File

@ -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;
}