From e3afd485c2b54a401f0fcfb817d41efc87ce9b68 Mon Sep 17 00:00:00 2001 From: "dveditz%netscape.com" Date: Mon, 30 Aug 1999 22:08:32 +0000 Subject: [PATCH] Bug 12242 --- xpinstall/src/nsInstallPatch.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/xpinstall/src/nsInstallPatch.cpp b/xpinstall/src/nsInstallPatch.cpp index 1ed7d814cd4..1a849697659 100644 --- a/xpinstall/src/nsInstallPatch.cpp +++ b/xpinstall/src/nsInstallPatch.cpp @@ -259,7 +259,11 @@ PRInt32 nsInstallPatch::Complete() mInstall->GetPatch(&ikey, &fileName); - if (fileName != nsnull && (*fileName == *mPatchedFile) ) + if (fileName == nsnull) + { + err = nsInstall::UNEXPECTED_ERROR; + } + else if (*fileName == *mPatchedFile) { // the patch has not been superceded--do final replacement err = ReplaceFileNowOrSchedule( *mPatchedFile, *mTargetFile); @@ -271,10 +275,13 @@ PRInt32 nsInstallPatch::Complete() char* tempRegName = mRegistryName->ToNewCString(); char* tempVersion = tempVersionString.ToNewCString(); - err = VR_Install( tempRegName, - (char*) (const char *) nsNSPRPath(*mTargetFile), - tempVersion, - PR_FALSE ); + // DO NOT propogate version registry errors, it will abort + // FinalizeInstall() leaving things hosed. These piddly errors + // aren't worth that. + VR_Install( tempRegName, + (char*) (const char *) nsNSPRPath(*mTargetFile), + tempVersion, + PR_FALSE ); if (tempRegName) delete [] tempRegName; if (tempVersion) delete [] tempVersion; @@ -330,7 +337,7 @@ nsInstallPatch::CanUninstall() PRBool nsInstallPatch::RegisterPackageNode() { - return PR_FALSE; + return PR_TRUE; }