commit dec5af4d6a5592103fb7692e8f99d10fa368841a
parent b5d07e1951b7beb1c6e5f1dd14af3c4e0b248770
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 7 Mar 2013 16:04:19 -0500
Fix file sync error
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js
@@ -929,8 +929,15 @@ Zotero.Sync.Storage.ZFS = (function () {
var lastSyncURI = this._getLastSyncURI(libraryID);
- return Zotero.HTTP.promise("POST", lastSyncURI, { debug: true })
+ return Zotero.HTTP.promise("POST", lastSyncURI, { debug: true, successCodes: [200, 404] })
.then(function (req) {
+ // Not yet synced
+ //
+ // TODO: Don't call this at all if no files uploaded
+ if (req.status == 404) {
+ return;
+ }
+
var ts = req.responseText;
var sql = "REPLACE INTO version VALUES (?, ?)";