commit f9c07bb8e07224e758b52b50245b57e36f8b9fdb
parent a30106c88715f5c7d650c277806fdc64956a4350
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 1 Sep 2008 03:42:42 +0000
Fix one other case where the sync could never end
Diffstat:
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -689,12 +689,8 @@ Zotero.Sync.Storage = new function () {
this.downloadFile = function (itemID) {
var item = Zotero.Items.get(itemID);
if (!item) {
- var msg = "Item " + itemID
- + " not found in Zotero.Sync.Storage.downloadFile()";
- Zotero.debug(msg);
- Components.utils.reportError(msg);
- _queueAdvance('download', Zotero.Sync.Storage.downloadFile, true);
- return;
+ _error("Item " + itemID
+ + " not found in Zotero.Sync.Storage.downloadFile()");
}
// Retrieve modification time from server to store locally afterwards
@@ -1121,6 +1117,17 @@ Zotero.Sync.Storage = new function () {
if (fileList.length == 0) {
Zotero.debug('No files to add -- removing zip file');
tmpFile.remove(null);
+ _removeRequest({
+ name: _getItemURI(item).spec,
+ requestMethod: "PUT",
+ QueryInterface: function (iid) {
+ if (iid.equals(Components.interfaces.nsIHttpChannel) ||
+ iid.equals(Components.interfaces.nsISupports)) {
+ return this;
+ }
+ throw Components.results.NS_NOINTERFACE;
+ }
+ });
_queueAdvance('upload', Zotero.Sync.Storage.uploadFile, true);
return false;
}