Bug 1671715 - Don't try to reboot if cleaning up UpdateLogs fails. r=agashlin, a=jcristau
authorMolly Howell <mhowell@mozilla.com>
Fri, 16 Oct 2020 22:50:11 +0000
changeset 618980 11baa02b4e2ad63a73ced2aa4d6d88617ad952aa
parent 618979 73374137806fbd116a0325aca548d30d0094e1c1
child 618981 c88c6f80d2d274d2563acc297b54685ab0f7023b
push id2439
push userjcristau@mozilla.com
push dateMon, 26 Oct 2020 13:38:53 +0000
treeherdermozilla-release@368d17ec7a2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagashlin, jcristau
bugs1671715, 1665195
Bug 1671715 - Don't try to reboot if cleaning up UpdateLogs fails. r=agashlin, a=jcristau My patch for bug 1665195 included a REBOOTOK flag because I wanted to make sure the UpdateLogs directory would get deleted even if doing so failed at the moment. What I didn't realize is that the RmDir instruction will set the reboot flag if removing the directory fails for any reason whatsoever, even if it's just because the directory wasn't empty, in which case rebooting wouldn't help. For some reason I thought there was a check for that condition, but having now had a look in the NSIS source, there is not. There's no easy way to check for ourselves whether the directory is empty or not, so to avoid a spurious reboot prompt from either the installer or the uninstaller, this patch just gives up on the REBOOTOK flag. Differential Revision: https://phabricator.services.mozilla.com/D93860
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -3704,17 +3704,17 @@
           ; with the install hash and an extension indicating the kind of file.
           ; so use a wildcard to delete them all.
           Delete "$PROGRAMFILES32\Mozilla Maintenance Service\UpdateLogs\$R1.*"
           ; If the UpdateLogs directory is now empty, then delete it.
           ; The Maintenance Service uninstaller should do this, but it may not
           ; be up to date enough because of bug 1665193, so doing this here as
           ; well lets us make sure it really happens.
-          RmDir /REBOOTOK "$PROGRAMFILES32\Mozilla Maintenance Service\UpdateLogs"
+          RmDir "$PROGRAMFILES32\Mozilla Maintenance Service\UpdateLogs"
       Pop $R0
       Pop $R1
       Pop $R2