diff --git a/src/net.c b/src/net.c index a87d84c8..e1ce0a8a 100644 --- a/src/net.c +++ b/src/net.c @@ -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() diff --git a/src/rufus.c b/src/rufus.c index 0d652b59..c9719606 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -552,7 +552,7 @@ static BOOL SetFileSystemAndClusterSize(char* fs_type) static void SetFSFromISO(void) { int i, fs_tmp, preferred_fs = FS_UNKNOWN; - uint32_t fs_mask = 0; + uint32_t fs_mask = FS_FAT32 | FS_NTFS; BOOL windows_to_go = (image_options & IMOP_WINTOGO) && (bt == BT_IMAGE) && HAS_WINTOGO(img_report) && (ComboBox_GetCurSel(GetDlgItem(hMainDialog, IDC_IMAGE_OPTION)) == 1); @@ -594,11 +594,15 @@ static void SetFSFromISO(void) } // Try to select the FS - for (i=0; i