Bug 1500983 - Fix StartMenuShortcuts installer INI setting always being overridden. r=agashlin
authorMatt Howell <mhowell@mozilla.com>
Mon, 22 Oct 2018 23:32:58 +0000
changeset 490938 52569b2e27a8018e945ea0e2ade37b0b325458c6
parent 490937 51b0078af6385a478f640ca30c87c74586e70d32
child 490939 ed389461fa718da263a79ca2a9f1cd3d1b0eee27
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersagashlin
bugs1500983
milestone65.0a1
Bug 1500983 - Fix StartMenuShortcuts installer INI setting always being overridden. r=agashlin Differential Revision: https://phabricator.services.mozilla.com/D9453
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -5087,20 +5087,21 @@
             ${If} $R8 == "false"
               StrCpy $AddStartMenuSC "0"
             ${Else}
               StrCpy $AddStartMenuSC "1"
             ${EndIf}
 
             ; We still accept the plural version for backwards compatibility,
             ; but the singular version takes priority.
+            ClearErrors
             ReadINIStr $R8 $R7 "Install" "StartMenuShortcut"
             ${If} $R8 == "false"
               StrCpy $AddStartMenuSC "0"
-            ${Else}
+            ${ElseIfNot} ${Errors}
               StrCpy $AddStartMenuSC "1"
             ${EndIf}
 
             ReadINIStr $R8 $R7 "Install" "TaskbarShortcut"
             ${If} $R8 == "false"
               StrCpy $AddTaskbarSC "0"
             ${Else}
               StrCpy $AddTaskbarSC "1"