aboutsummaryrefslogtreecommitdiffstats
path: root/www/firefox/files
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-07-28 04:51:02 +0800
committermarcus <marcus@FreeBSD.org>2004-07-28 04:51:02 +0800
commitb2c4f25cf25f143732e5d464d19efc9345512ad7 (patch)
tree9d9b75caafd554542071e36def3f1d821db0afe6 /www/firefox/files
parentbd011bbbab4a2e02cc132100561f39e74abee42e (diff)
downloadfreebsd-ports-gnome-b2c4f25cf25f143732e5d464d19efc9345512ad7.tar.gz
freebsd-ports-gnome-b2c4f25cf25f143732e5d464d19efc9345512ad7.tar.zst
freebsd-ports-gnome-b2c4f25cf25f143732e5d464d19efc9345512ad7.zip
Fix global extension and theme installation by making sure the path to the
XPI file does no contain a leading "file://" when passed to the extension manager. See http://bugzilla.mozilla.org/show_bug.cgi?id=250847 for more details. Reported by: ale
Diffstat (limited to 'www/firefox/files')
-rw-r--r--www/firefox/files/patch-toolkit_mozapps_extensions_src_nsExtensionManager.js.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/www/firefox/files/patch-toolkit_mozapps_extensions_src_nsExtensionManager.js.in b/www/firefox/files/patch-toolkit_mozapps_extensions_src_nsExtensionManager.js.in
new file mode 100644
index 000000000000..feffd2c6344f
--- /dev/null
+++ b/www/firefox/files/patch-toolkit_mozapps_extensions_src_nsExtensionManager.js.in
@@ -0,0 +1,17 @@
+--- toolkit/mozapps/extensions/src/nsExtensionManager.js.in.orig Tue Jul 27 15:35:12 2004
++++ toolkit/mozapps/extensions/src/nsExtensionManager.js.in Tue Jul 27 15:36:02 2004
+@@ -1568,9 +1568,14 @@
+
+ _checkForGlobalInstalls: function (aPath, aItemType)
+ {
++ var fPrefix = "file://";
+ // First see if the path supplied is a file path
+ var file = Components.classes["@mozilla.org/file/local;1"]
+ .createInstance(Components.interfaces.nsILocalFile);
++ if (aPath.substr(0, fPrefix.length) == fPrefix) {
++ // Strip out the file:// prefix if it exists
++ aPath = aPath.substr(fPrefix.length, aPath.length);
++ }
+ try {
+ file.initWithPath(aPath);
+ }