commit ca31a181595fa57d8ec10a3266085a8d716f593e parent cabdd4977d0685b2f26d00105668e110bcf7961c Author: Dan Stillman <dstillman@zotero.org> Date: Sat, 13 Feb 2010 09:45:29 +0000 Auto-correct most (if not all) cases of "Unexpected status 404 in Zotero.Sync.Storage.Session.ZFS._getFileUploadParameters()" Diffstat:
| M | chrome/content/zotero/xpcom/storage/zfs.js | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js @@ -533,6 +533,22 @@ Zotero.Sync.Storage.Session.ZFS.prototype._getFileUploadParameters = function (i self.onError(e); return; } + else if (req.status == 404) { + Components.utils.reportError("Unexpected status code 404 in " + funcName + + " (" + Zotero.Items.getLibraryKeyHash(item) + ")"); + if (Zotero.Prefs.get('sync.debugNoAutoResetClient')) { + Components.utils.reportError("Skipping automatic client reset due to debug pref"); + return; + } + if (!Zotero.Sync.Server.canAutoResetClient) { + Components.utils.reportError("Client has already been auto-reset -- manual sync required"); + return; + } + Zotero.Sync.Server.resetClient(); + Zotero.Sync.Server.canAutoResetClient = false; + self.onError(); + return; + } else if (req.status != 200) { var msg = "Unexpected status code " + req.status + " in " + funcName + " (" + Zotero.Items.getLibraryKeyHash(item) + ")";