Fix "Import into new collection" option when handling importable file
This commit is contained in:
parent
d38d55e2b4
commit
0383f104dd
2 changed files with 8 additions and 2 deletions
|
@ -306,7 +306,10 @@ var Zotero_File_Interface = new function() {
|
|||
}
|
||||
if (typeof options == 'string' || options instanceof Components.interfaces.nsIFile) {
|
||||
Zotero.debug("WARNING: importFile() now takes a single options object -- update your code");
|
||||
options = { file: options };
|
||||
options = {
|
||||
file: options,
|
||||
createNewCollection: arguments[1]
|
||||
};
|
||||
}
|
||||
|
||||
var file = options.file ? Zotero.File.pathToFile(options.file) : null;
|
||||
|
|
|
@ -636,7 +636,10 @@ ZoteroCommandLineHandler.prototype = {
|
|||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var browserWindow = wm.getMostRecentWindow("navigator:browser");
|
||||
browserWindow.Zotero_File_Interface.importFile(file, checkState.value);
|
||||
browserWindow.Zotero_File_Interface.importFile({
|
||||
file,
|
||||
createNewCollection: checkState.value
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue