From b2c4f25cf25f143732e5d464d19efc9345512ad7 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 27 Jul 2004 20:51:02 +0000 Subject: 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 --- www/firefox3-devel/Makefile | 1 + ...lkit_mozapps_extensions_src_nsExtensionManager.js.in | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 www/firefox3-devel/files/patch-toolkit_mozapps_extensions_src_nsExtensionManager.js.in (limited to 'www/firefox3-devel') diff --git a/www/firefox3-devel/Makefile b/www/firefox3-devel/Makefile index faee9ffb4148..5eeeb7b36085 100644 --- a/www/firefox3-devel/Makefile +++ b/www/firefox3-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= firefox PORTVERSION= 0.9.1 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${PORTVERSION} diff --git a/www/firefox3-devel/files/patch-toolkit_mozapps_extensions_src_nsExtensionManager.js.in b/www/firefox3-devel/files/patch-toolkit_mozapps_extensions_src_nsExtensionManager.js.in new file mode 100644 index 000000000000..feffd2c6344f --- /dev/null +++ b/www/firefox3-devel/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); + } -- cgit