Take path or nsIFile in Zotero.File.pathToFileURI()

This commit is contained in:
Dan Stillman 2022-06-17 18:24:19 -04:00
parent 41dd75af8a
commit 7f748b2620

View file

@ -57,8 +57,8 @@ Zotero.File = new function(){
} }
this.pathToFileURI = function (path) { this.pathToFileURI = function (pathOrFile) {
var file = new FileUtils.File(path); var file = this.pathToFile(pathOrFile);
return Services.io.newFileURI(file).spec; return Services.io.newFileURI(file).spec;
} }