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:
Joscha Legewie 2016-05-30 09:02:40 -04:00
parent 6bff554976
commit 00497eda3b

View file

@ -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();
}