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) { else if (handler) {
let icon; let icon;
try { try {
let fph = Services.io.getProtocolHandler("file") let urlspec = Zotero.File.pathToFileURI(handler);
.QueryInterface(Components.interfaces.nsIFileProtocolHandler);
let urlspec = fph.getURLSpecFromFile(Zotero.File.pathToFile(handler));
icon = "moz-icon://" + urlspec + "?size=16"; icon = "moz-icon://" + urlspec + "?size=16";
} }
catch (e) { catch (e) {