From 7e5e37e98e4766f7071c4385a03729e658e70cfd Mon Sep 17 00:00:00 2001 From: "sgehani%netscape.com" Date: Tue, 31 Aug 1999 01:15:26 +0000 Subject: [PATCH] Fixes for bug 12510. --- xpinstall/src/nsInstall.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/xpinstall/src/nsInstall.cpp b/xpinstall/src/nsInstall.cpp index b3a9e32bb6af..5047e01a612e 100644 --- a/xpinstall/src/nsInstall.cpp +++ b/xpinstall/src/nsInstall.cpp @@ -281,6 +281,18 @@ nsInstall::AddDirectory(const nsString& aRegName, return NS_OK; } + nsString qualifiedVersion = aVersion; + if (qualifiedVersion == "") + { + // assume package version for overriden forms that don't take version info + *aReturn = mVersionInfo->ToString(qualifiedVersion); + } + + if (*aReturn != SUCCESS) + { + return NS_OK; + } + nsString subdirectory(aSubdir); if (subdirectory != "") @@ -328,7 +340,7 @@ nsInstall::AddDirectory(const nsString& aRegName, ie = new nsInstallFile( this, fullRegName, - aVersion, + qualifiedVersion, newJarSource, aFolder, newSubDir, @@ -417,6 +429,7 @@ nsInstall::AddSubcomponent(const nsString& aRegName, { nsInstallFile* ie; nsString qualifiedRegName; + nsString qualifiedVersion; nsString tempTargetName; PRInt32 errcode = nsInstall::SUCCESS; @@ -444,6 +457,17 @@ nsInstall::AddSubcomponent(const nsString& aRegName, return NS_OK; } + qualifiedVersion = aVersion; + if (qualifiedVersion == "") + { + // assume package version for overriden forms that don't take version info + *aReturn = mVersionInfo->ToString(qualifiedVersion); + } + + if (*aReturn != SUCCESS) + { + return NS_OK; + } if ( aRegName == "" || aRegName == "null") { @@ -463,7 +487,7 @@ nsInstall::AddSubcomponent(const nsString& aRegName, ie = new nsInstallFile( this, qualifiedRegName, - aVersion, + qualifiedVersion, aJarSource, aFolder, tempTargetName,