commit efbb0a5c8f342920415286dcf0e1aa1d8c80877d
parent 6e0aa9da25f0cc42c88960fd688ec1afc7a48565
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 1 Dec 2011 01:00:42 -0500
Still upload files, even when "as needed" downloading is enabled
Diffstat:
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -141,9 +141,8 @@ Zotero.Sync.Storage = new function () {
return;
}
- if ((!module.includeUserFiles || !Zotero.Sync.Storage.downloadOnSync())
- && (!module.includeGroupFiles || !Zotero.Sync.Storage.downloadOnSync('groups'))) {
- Zotero.debug("No libraries are enabled for on-sync downloading");
+ if (!module.includeUserFiles && !module.includeGroupFiles) {
+ Zotero.debug("No libraries are enabled for " + module.name + " syncing");
Zotero.Sync.Storage.EventManager.skip();
return;
}
@@ -969,10 +968,15 @@ Zotero.Sync.Storage = new function () {
_syncInProgress = true;
}
- var downloadFileIDs = _getFilesToDownload(
- module.includeUserFiles && Zotero.Sync.Storage.downloadOnSync(),
- module.includeGroupFiles && Zotero.Sync.Storage.downloadOnSync('groups')
- );
+ var includeUserFiles = module.includeUserFiles && Zotero.Sync.Storage.downloadOnSync();
+ var includeGroupFiles = module.includeGroupFiles && Zotero.Sync.Storage.downloadOnSync('groups');
+
+ if (!includeUserFiles && !includeGroupFiles) {
+ Zotero.debug("No libraries are enabled for on-sync downloading");
+ return false;
+ }
+
+ var downloadFileIDs = _getFilesToDownload(includeUserFiles, includeGroupFiles);
if (!downloadFileIDs) {
Zotero.debug("No files to download");
return false;