From 00497eda3ba9426f7e76b77f6b588c00f11aedf5 Mon Sep 17 00:00:00 2001 From: Joscha Legewie Date: Mon, 30 May 2016 09:02:40 -0400 Subject: [PATCH] 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. --- chrome/content/zotero/xpcom/zotero.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 32eaa2a943..82f731b521 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -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(); }