From 3edb2e4538bf6cf95a754555a6cc2c03e3efd04d Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Tue, 4 Jul 2006 22:03:14 +0000 Subject: [PATCH] Bug 343581 - Uninstaller removed required system folder 'C:\Documents and Settings\All Users\Desktop'. r=sspitzer git-svn-id: svn://10.0.0.236/trunk@201539 18797224-902f-48f8-a5cc-f745e15eee43 --- .../installer/windows/nsis/installer.nsi | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/mozilla/browser/installer/windows/nsis/installer.nsi b/mozilla/browser/installer/windows/nsis/installer.nsi index 7a5bc66dfca..64b5321258b 100755 --- a/mozilla/browser/installer/windows/nsis/installer.nsi +++ b/mozilla/browser/installer/windows/nsis/installer.nsi @@ -993,15 +993,27 @@ Function un.RemoveDirsCallback Call un.GetParentDir Pop $R0 GetFullPathName $R1 "$R0" + ; We only try to remove empty directories but the Desktop, StartMenu, and + ; QuickLaunch directories can be empty so guard against removing them. + SetShellVarContext all + ${If} $R1 == "$DESKTOP" + ${OrIf} $R1 == "$STARTMENU" + GoTo end + ${EndIf} + SetShellVarContext current + ${If} $R1 == "$QUICKLAUNCH" + ${OrIf} $R1 == "$DESKTOP" + ${OrIf} $R1 == "$STARTMENU" + GoTo end + ${EndIf} ${If} ${FileExists} "$R1" RmDir "$R1" ${EndIf} ${If} ${Errors} - ${OrIf} $R2 != "INSTDIR" + ${OrIf} $R1 != "$INSTDIR" GoTo end - ${Else} - GoTo loop ${EndIf} + GoTo loop ${EndIf} end: