Allow string path as argument to Zotero.launchFile()
Not sure whether this is desired but it helps to reduce the use of nsIFile to a minimum. `file.launch()` and `file.reveal()` are two of the few things that are not possible with OS.File/OS.Path. When that changes, Zotero.launchFile is the only function that needs to be modified if it works with string paths.
This commit is contained in:
parent
6bff554976
commit
00497eda3b
1 changed files with 1 additions and 0 deletions
|
@ -1223,6 +1223,7 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
|
|||
* Launch a file, the best way we can
|
||||
*/
|
||||
this.launchFile = function (file) {
|
||||
file = Zotero.File.pathToFile(file);
|
||||
try {
|
||||
file.launch();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue