From efbb0a5c8f342920415286dcf0e1aa1d8c80877d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 1 Dec 2011 01:00:42 -0500 Subject: [PATCH] Still upload files, even when "as needed" downloading is enabled --- chrome/content/zotero/xpcom/storage.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index e80e22fdfa..d7c0208d74 100644 --- 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;