Fix file sync error in Gecko 23+ if local file path is too long
This commit is contained in:
parent
610017e4df
commit
c29720743a
1 changed files with 6 additions and 1 deletions
|
@ -1058,7 +1058,12 @@ Zotero.Sync.Storage = new function () {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(function (e) {
|
.catch(function (e) {
|
||||||
if (e instanceof OS.File.Error && e.becauseNoSuchFile) {
|
if (e instanceof OS.File.Error &&
|
||||||
|
(e.becauseNoSuchFile
|
||||||
|
// This can happen if a path is too long on Windows,
|
||||||
|
// e.g. a file is being accessed on a VM through a share
|
||||||
|
// (and probably in other cases).
|
||||||
|
|| (e.winLastError && e.winLastError == 3))) {
|
||||||
Zotero.debug("Marking attachment " + lk + " as missing");
|
Zotero.debug("Marking attachment " + lk + " as missing");
|
||||||
updatedStates[item.id] = Zotero.Sync.Storage.SYNC_STATE_TO_DOWNLOAD;
|
updatedStates[item.id] = Zotero.Sync.Storage.SYNC_STATE_TO_DOWNLOAD;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue