diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index d79c4b654..234715edb 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -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; diff --git a/components/zotero-service.js b/components/zotero-service.js index 751935df5..8cb26d9b2 100644 --- a/components/zotero-service.js +++ b/components/zotero-service.js @@ -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 + }); } } });