From 6297d0862fce79d04e976fb6fe88ccf38c43ff8d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 20 Jun 2022 23:12:19 -0400 Subject: [PATCH] fx-compat: Replace last use of getURLSpecFromFile() Follow-up to 8f7a160ba14 Untested, since it's in the prefs -- we'll have to see if this works after #2659 --- chrome/content/zotero/preferences/preferences_general.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences_general.js b/chrome/content/zotero/preferences/preferences_general.js index f9863004ee..d0d4edc91c 100644 --- a/chrome/content/zotero/preferences/preferences_general.js +++ b/chrome/content/zotero/preferences/preferences_general.js @@ -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) {