From 5d5c043161319e22eccfc401471a0d9aa338effa Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 5 Feb 2025 01:53:02 -0500 Subject: [PATCH] Fix sync not downloading queued objects on first sync of session `firstInSession` wasn't being properly set, so previously failed data objects weren't being retried until a manual sync. Local files also weren't being scanned for changes for three hours, but that's probably better in the age of DB-stored annotations, so leave that off for now and address properly in #5025. --- chrome/content/zotero/xpcom/storage/storageEngine.js | 4 +++- chrome/content/zotero/xpcom/sync/syncRunner.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/storage/storageEngine.js b/chrome/content/zotero/xpcom/storage/storageEngine.js index b5812f9f95..bade75b53b 100644 --- a/chrome/content/zotero/xpcom/storage/storageEngine.js +++ b/chrome/content/zotero/xpcom/storage/storageEngine.js @@ -149,7 +149,9 @@ Zotero.Sync.Storage.Engine.prototype.start = Zotero.Promise.coroutine(function* // full check of this library, check only files that were previously modified or opened // recently else if (this.background - && !this.firstInSession + // TEMP: Don't check all files at startup + // https://github.com/zotero/zotero/issues/5025 + //&& !this.firstInSession && this.local.lastFullFileCheck[libraryID] && (this.local.lastFullFileCheck[libraryID] + (this.maxCheckAge * 1000)) > new Date().getTime()) { diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js index c527d78be8..d08373ed79 100644 --- a/chrome/content/zotero/xpcom/sync/syncRunner.js +++ b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -230,7 +230,7 @@ Zotero.Sync.Runner_Module = function (options = {}) { } }.bind(this), background: !!options.background, - firstInSession: _firstInSession, + firstInSession: options.firstInSession, resetMode: options.resetMode };