From dec5af4d6a5592103fb7692e8f99d10fa368841a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 7 Mar 2013 16:04:19 -0500 Subject: [PATCH] Fix file sync error --- chrome/content/zotero/xpcom/storage/zfs.js | 9 ++++++++- 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 index 979fe17f99..e8b721191e 100644 --- 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 (?, ?)";