fx-compat: Replace last use of getURLSpecFromFile()

Follow-up to 8f7a160ba1

Untested, since it's in the prefs -- we'll have to see if this works
after #2659
This commit is contained in:
Dan Stillman 2022-06-20 23:12:19 -04:00
parent 789a8a5fe9
commit 6297d0862f

View file

@ -95,9 +95,7 @@ Zotero_Preferences.General = {
else if (handler) {
let icon;
try {
let fph = Services.io.getProtocolHandler("file")
.QueryInterface(Components.interfaces.nsIFileProtocolHandler);
let urlspec = fph.getURLSpecFromFile(Zotero.File.pathToFile(handler));
let urlspec = Zotero.File.pathToFileURI(handler);
icon = "moz-icon://" + urlspec + "?size=16";
}
catch (e) {