[ui] fix fs selection and remove prompt for GRUB/Syslinux downloads in GPT mode

* FS selection might default to NTFS instead of FAT32 after having selected a Linux ISO if
  no drive was plugged in when the ISO was selected and then a drive was plugged using NTFS.
* Also display Fido's exist code
* Closes #1255
This commit is contained in:
Pete Batard 2019-03-14 18:53:08 +00:00
parent 38d906deed
commit 25a4666911
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 19 additions and 14 deletions

View file

@ -877,7 +877,7 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
char *url = NULL, sig_url[128];
BYTE *sig = NULL;
HANDLE hFile, hPipe;
DWORD dwSize, dwAvail, dwPipeSize = 4096;
DWORD dwExitCode, dwSize, dwAvail, dwPipeSize = 4096;
GUID guid;
IGNORE_RETVAL(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED));
@ -956,9 +956,10 @@ static DWORD WINAPI DownloadISOThread(LPVOID param)
powershell_path, script_path, &pipe[9], locale_str, icon_path, lmprintf(MSG_149));
// Signal our Windows alert hook that it should close the IE cookie prompts from Fido
close_fido_cookie_prompts = TRUE;
FormatStatus = RunCommand(cmdline, app_dir, TRUE);
dwExitCode = RunCommand(cmdline, app_dir, TRUE);
uprintf("Exited download script with code: %d", dwExitCode);
close_fido_cookie_prompts = FALSE;
if ((FormatStatus == 0) && PeekNamedPipe(hPipe, NULL, dwPipeSize, NULL, &dwAvail, NULL) && (dwAvail != 0)) {
if ((dwExitCode == 0) && PeekNamedPipe(hPipe, NULL, dwPipeSize, NULL, &dwAvail, NULL) && (dwAvail != 0)) {
url = malloc(dwAvail + 1);
if ((url != NULL) && ReadFile(hPipe, url, dwAvail, &dwSize, NULL) && (dwSize > 4)) {
#else
@ -1007,7 +1008,7 @@ out:
#endif
free(url);
SendMessage(hMainDialog, UM_ENABLE_CONTROLS, 0, 0);
ExitThread(FormatStatus);
ExitThread(dwExitCode);
}
BOOL DownloadISO()