commit a30106c88715f5c7d650c277806fdc64956a4350
parent 93a213e9e53b4229a74ac4ae4216dee98f47e89e
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 1 Sep 2008 03:28:04 +0000
Storage sync never stopped if file-to-download was missing
Diffstat:
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -701,6 +701,17 @@ Zotero.Sync.Storage = new function () {
Zotero.Sync.Storage.getStorageModificationTime(item, function (item, mdate) {
if (!mdate) {
Zotero.debug("Remote file not found for item " + item.id);
+ _removeRequest({
+ name: _getItemURI(item).spec,
+ requestMethod: "GET",
+ QueryInterface: function (iid) {
+ if (iid.equals(Components.interfaces.nsIHttpChannel) ||
+ iid.equals(Components.interfaces.nsISupports)) {
+ return this;
+ }
+ throw Components.results.NS_NOINTERFACE;
+ }
+ });
_queueAdvance('download', Zotero.Sync.Storage.downloadFile, true);
return;
}
@@ -1816,8 +1827,8 @@ Zotero.Sync.Storage = new function () {
* Also updates progress meter
*/
function _resetRequestsIfDone() {
- Zotero.debug(_requests);
- Zotero.debug(_numRequests);
+ //Zotero.debug(_requests);
+ //Zotero.debug(_numRequests);
for (var queue in _requests) {
if (_numRequests[queue].active != 0 || _numRequests[queue].queued != 0) {
return false;