From 7f748b262054b2088487f9664c479ede59d091fa Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 17 Jun 2022 18:24:19 -0400 Subject: [PATCH] Take path or nsIFile in Zotero.File.pathToFileURI() --- chrome/content/zotero/xpcom/file.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 1884ad2c92..4323a4ed77 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -57,8 +57,8 @@ Zotero.File = new function(){ } - this.pathToFileURI = function (path) { - var file = new FileUtils.File(path); + this.pathToFileURI = function (pathOrFile) { + var file = this.pathToFile(pathOrFile); return Services.io.newFileURI(file).spec; }