From 4502b5e9902dd07f2e5c4acd965fb65b4a0d66ad Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 2 May 2017 16:56:55 -0400 Subject: [PATCH] Debugging for sync issue --- chrome/content/zotero/xpcom/sync/syncEngine.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js index 2f5b60378..7086a27fa 100644 --- a/chrome/content/zotero/xpcom/sync/syncEngine.js +++ b/chrome/content/zotero/xpcom/sync/syncEngine.js @@ -824,7 +824,13 @@ Zotero.Sync.Data.Engine.prototype._startUpload = Zotero.Promise.coroutine(functi let unsyncedKeys = ids.map(id => objectsClass.getLibraryAndKeyFromID(id).key); let origUnsynced = unsyncedKeys; // TEMP let queueKeys = yield Zotero.Sync.Data.Local.getObjectsFromSyncQueue(objectType, this.libraryID); + let num = unsyncedKeys.length; unsyncedKeys = Zotero.Utilities.arrayDiff(unsyncedKeys, queueKeys); + if (unsyncedKeys.length < num) { + Zotero.debug(`Skipping ${num - unsyncedKeys.length} key(s) in sync queue`); + Zotero.debug(Zotero.Utilities.arrayDiff(unsyncedKeys, queueKeys)); + } + // TEMP //ids = unsyncedKeys.map(key => objectsClass.getIDFromLibraryAndKey(this.libraryID, key)); let missing = [];