Show file path instead of "(null)" when installing style via file open

And fix deprecation warning from passing an nsIFile

(Also updates the Zotero.Styles.install() documentation to note that the
first parameter's `file` property can be a string path.)
This commit is contained in:
Dan Stillman 2017-12-08 00:04:00 -05:00
parent 045f1fbb7e
commit 9a43b53ebe
2 changed files with 6 additions and 5 deletions

View file

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