diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js index cbd098a7f..e0d3f99ee 100644 --- a/chrome/content/zotero/xpcom/sync/syncRunner.js +++ b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -371,8 +371,10 @@ Zotero.Sync.Runner_Module = function (options = {}) { } let remoteGroupVersions = yield client.getGroupVersions(keyInfo.userID); + Zotero.debug(remoteGroupVersions); let remoteGroupIDs = Object.keys(remoteGroupVersions).map(id => parseInt(id)); let skippedGroups = Zotero.Sync.Data.Local.getSkippedGroups(); + Zotero.debug(skippedGroups); // Remove skipped groups if (syncAllLibraries) { @@ -390,10 +392,12 @@ Zotero.Sync.Runner_Module = function (options = {}) { // If syncing all libraries, mark any that don't exist, are outdated, or are // archived locally for update. Group is added to the library list after downloading. if (!group || group.version < remoteGroupVersions[id] || group.archived) { + Zotero.debug(`Marking group ${id} to download`); groupsToDownload.push(id); } // If not outdated, just add to library list else { + Zotero.debug(`Adding group library ${group.libraryID} to sync`); libraries.push(group.libraryID); } } @@ -425,6 +429,8 @@ Zotero.Sync.Runner_Module = function (options = {}) { .filter(id => Zotero.Libraries.get(id).libraryType == 'group') .map(id => Zotero.Groups.getGroupIDFromLibraryID(id)) } + Zotero.debug("Local groups:"); + Zotero.debug(localGroups); remotelyMissingGroups = Zotero.Utilities.arrayDiff(localGroups, remoteGroupIDs) .map(id => Zotero.Groups.get(id)); } @@ -547,6 +553,8 @@ Zotero.Sync.Runner_Module = function (options = {}) { } // Note: If any non-group library types become archivable, they'll need to be unarchived here. + Zotero.debug("Final libraries to sync:"); + Zotero.debug(libraries); return [...new Set(libraries)]; });