diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index 64a784ab94..406b91fb23 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -1817,7 +1817,9 @@ Zotero.Fulltext = Zotero.FullText = new function () { itemProgress.setProgress(100); } } - await this.optimizeContentIndex(); + if (done > 0) { + await this.optimizeContentIndex(); + } // Reclaim the space freed by a rebuild (e.g., an index-format change dropping the old // tables), which can be most of the file; the freelist gate makes this a no-op on // ordinary startups diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index cd4bf1df9f..2f6e49402f 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1971,7 +1971,10 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte await Zotero.DB.executeTransaction(async function () { return Zotero.Tags.purge(); }); - await Zotero.FullText.purgeOrphanedContent(); + // Items.purge() below resets the pref + if (Zotero.Prefs.get('purge.items')) { + await Zotero.FullText.purgeOrphanedContent(); + } await Zotero.Items.purge(); // DEBUG: this might not need to be permanent //yield Zotero.DB.executeTransaction(async function () {