[APPWIZ] Do not display the message box if the user aborts the download 946/head
authorBișoc George <fraizeraust99@gmail.com>
Sun, 14 Oct 2018 14:07:51 +0000 (16:07 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Sun, 21 Oct 2018 11:10:12 +0000 (13:10 +0200)
CORE-15183

dll/cpl/appwiz/addons.c

index c2fb28d..238348d 100644 (file)
@@ -362,10 +362,15 @@ static DWORD WINAPI download_proc(PVOID arg)
 
     hres = URLDownloadToFileW(NULL, GeckoUrl, tmp_file, 0, &InstallCallback);
     if(FAILED(hres)) {
-        ERR("URLDownloadToFile failed: %08x\n", hres);
         if (LoadStringW(hApplet, IDS_DWL_FAILED, message, sizeof(message) / sizeof(WCHAR))) {
-            MessageBoxW(NULL, message, NULL, MB_ICONERROR);
+            /* If the user aborted the download, DO NOT display the message box */
+            if (hres == E_ABORT) {
+                TRACE("Downloading of Gecko package aborted!\n");
+            } else {
+                MessageBoxW(NULL, message, NULL, MB_ICONERROR);
+            }
         }
+        ERR("URLDownloadToFile failed: %08x\n", hres);
     } else {
         if(sha_check(tmp_file)) {
             install_file(tmp_file);