[APPWIZ] Do not display the message box if the user aborts the download

CORE-15183
This commit is contained in:
Bișoc George 2018-10-14 16:07:51 +02:00 committed by Mark Jansen
parent 125db5ead9
commit f31cf503fb
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View 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);