diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js index 3293d8a9ec..c71189758c 100644 --- a/chrome/content/zotero/xpcom/style.js +++ b/chrome/content/zotero/xpcom/style.js @@ -269,10 +269,11 @@ Zotero.Styles = new function() { /** * Installs a style file, getting the contents of an nsIFile and showing appropriate * error messages - * @param {Object} style An object with one of the following properties - * - file: An nsIFile representing a style on disk - * - url: A url of the location of the style (local or remote) - * - string: A string containing the style data + * @param {Object} style - An object with one of the following properties + * - file: An nsIFile or string path representing a style on disk + * - path: A string path + * - url: A url of the location of the style (local or remote) + * - string: A string containing the style data * @param {String} origin The origin of the style, either a filename or URL, to be * displayed in dialogs referencing the style * @param {Boolean} [silent=false] Skip prompts diff --git a/components/zotero-service.js b/components/zotero-service.js index a490f9ce3e..4a3af985a7 100644 --- a/components/zotero-service.js +++ b/components/zotero-service.js @@ -623,7 +623,7 @@ ZoteroCommandLineHandler.prototype = { if(file.leafName.substr(-4).toLowerCase() === ".csl" || file.leafName.substr(-8).toLowerCase() === ".csl.txt") { // Install CSL file - Zotero.Styles.install(file); + Zotero.Styles.install({ file: file.path }, file.path); } else { // Ask before importing var checkState = {