From cb53e13e67f2bb8211edd6ca3bf7db085f1473c5 Mon Sep 17 00:00:00 2001 From: Tim Abraldes Date: Mon, 4 Jun 2012 00:23:17 -0700 Subject: [PATCH] bug 758044. Installation directory is now "scheme;host;port" with ";port" omitted if port is the default. Uninstall registry key is now "scheme://host:port" with ":port" omitted if the port is the default. r=felipe --- browser/modules/WebappsInstaller.jsm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/browser/modules/WebappsInstaller.jsm b/browser/modules/WebappsInstaller.jsm index c3f0be401bd..c8709e20afe 100644 --- a/browser/modules/WebappsInstaller.jsm +++ b/browser/modules/WebappsInstaller.jsm @@ -192,12 +192,16 @@ WinNativeApp.prototype = { // The ${InstallDir} format is as follows: // host of the app origin + ";" + - // protocol + ";" + - // port (-1 for default port) + // protocol + // + ";" + port (only if port is not default) this.installDir = Services.dirsvc.get("AppData", Ci.nsIFile); - this.installDir.append(this.launchURI.host + ";" + - this.launchURI.scheme + ";" + - this.launchURI.port); + let installDirLeaf = this.launchURI.scheme + + ";" + + this.launchURI.host; + if (this.launchURI.port != -1) { + installDirLeaf += ";" + this.launchURI.port; + } + this.installDir.append(installDirLeaf); this.uninstallDir = this.installDir.clone(); this.uninstallDir.append("uninstall"); @@ -220,8 +224,7 @@ WinNativeApp.prototype = { this.startMenuShortcut.followLinks = false; this.uninstallSubkeyStr = this.launchURI.scheme + "://" + - this.launchURI.host + ":" + - this.launchURI.port; + this.launchURI.hostPort; }, /**