From 25b9c677e3b97b1e441da8587590d72ec235432b Mon Sep 17 00:00:00 2001 From: Tom Najdek Date: Mon, 22 Apr 2024 19:06:20 +0200 Subject: [PATCH] Import into current collection if not creating new collection. Resolve #2291 --- chrome/content/zotero/fileInterface.js | 2 +- chrome/content/zotero/import/importWizard.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index d4c03fed30..4b2296cdab 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -399,7 +399,7 @@ var Zotero_File_Interface = new function() { * * @param {Object} options * @param {nsIFile|string|null} [options.file=null] - File to import, or none to show a filepicker - * @param {Boolean} [options.addToLibraryRoot=false] + * @param {Boolean} [options.addToLibraryRoot=false] - Use root library instead of a selected collection * @param {Boolean} [options.createNewCollection=true] - Put items in a new collection * @param {Boolean} [options.linkFiles=false] - Link to files instead of storing them * @param {Function} [options.onBeforeImport] - Callback to receive translation object, useful diff --git a/chrome/content/zotero/import/importWizard.js b/chrome/content/zotero/import/importWizard.js index b82d2a3fcd..7f81dacd1f 100644 --- a/chrome/content/zotero/import/importWizard.js +++ b/chrome/content/zotero/import/importWizard.js @@ -436,7 +436,7 @@ const Zotero_Import_Wizard = { // eslint-disable-line no-unused-vars try { const result = await Zotero_File_Interface.importFile({ - addToLibraryRoot: !shouldCreateCollection, + createNewCollection: shouldCreateCollection, file: this.file, fileTypes, folder: this.folder,