Import into current collection if not creating new collection. Resolve #2291

This commit is contained in:
Tom Najdek 2024-04-22 19:06:20 +02:00
parent 91054acfea
commit 25b9c677e3
No known key found for this signature in database
GPG key ID: EEC61A7B4C667D77
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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,