From 2a3bc76ce8cfa31f1e7956b34a9b5022b4527015 Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Wed, 19 Mar 2008 00:15:10 +0000 Subject: [PATCH] Bug 380015 - Crash [@ nsFrame::BoxReflow] on startup when Fx 2.0 libraries not removed from install directory. r=bsmedberg, blocking1.9=dsicore git-svn-id: svn://10.0.0.236/trunk@248159 18797224-902f-48f8-a5cc-f745e15eee43 --- .../mozapps/installer/windows/nsis/common.nsh | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh b/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh index b72ea078951..7ec1adfec08 100755 --- a/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh +++ b/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh @@ -3541,13 +3541,27 @@ StrCmp $R1 "File:" +1 end StrCpy $R9 "$R9" "" 6 IfFileExists "$INSTDIR$R9" +1 end + ClearErrors - Delete "$INSTDIR$R9" - IfErrors +1 +3 - ${LogMsg} "** ERROR Deleting File: $INSTDIR$R9 **" + ${DeleteFile} "$INSTDIR$R9" + IfErrors +3 +1 + ${LogMsg} "Deleted File: $INSTDIR$R9" GoTo end - ${LogMsg} "Deleted File: $INSTDIR$R9" + ClearErrors + Rename "$INSTDIR$R9" "$INSTDIR$R9.moz-delete" + IfErrors +1 reboot_delete + + ; Original file will be deleted on reboot + Delete /REBOOTOK "$INSTDIR$R9" + ${LogMsg} "Delayed Delete File (Reboot Required): $INSTDIR$R9" + GoTo end + + ; Renamed file will be deleted on reboot + reboot_delete: + Delete /REBOOTOK "$INSTDIR$R9.moz-delete" + ${LogMsg} "Delayed Delete File (Reboot Required): $INSTDIR$R9.moz-delete" + GoTo end end: ClearErrors