diff --git a/res/appstore/Package.appxmanifest b/res/appstore/Package.appxmanifest index 18cd923a..3f66dc9d 100644 --- a/res/appstore/Package.appxmanifest +++ b/res/appstore/Package.appxmanifest @@ -11,7 +11,7 @@ + Version="3.14.1768.0" /> Rufus diff --git a/src/rufus.c b/src/rufus.c index 75f7fe14..707be8f3 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -643,6 +643,7 @@ static void SetFSFromISO(void) static void SetMBRProps(void) { BOOL needs_masquerading = HAS_WINPE(img_report) && (!img_report.uses_minint); + fs_type = (int)ComboBox_GetCurItemData(hFileSystem); if ((!mbr_selected_by_user) && ((image_path == NULL) || (boot_type != BT_IMAGE) || (fs_type != FS_NTFS) || HAS_GRUB(img_report) || ((image_options & IMOP_WINTOGO) && ComboBox_GetCurItemData(hImageOption)) )) { @@ -1328,7 +1329,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param) FILE *fd; DWORD len; WPARAM ret = BOOTCHECK_CANCEL; - BOOL in_files_dir = FALSE; + BOOL in_files_dir = FALSE, esp_already_asked = FALSE; const char* grub = "grub"; const char* core_img = "core.img"; const char* ldlinux = "ldlinux"; @@ -1378,6 +1379,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param) write_as_esp = TRUE; else if (i == 3) write_as_image = TRUE; + esp_already_asked = TRUE; } else { char* choices[2] = { lmprintf(MSG_276, iso_image), lmprintf(MSG_277, dd_image) }; i = SelectionDialog(lmprintf(MSG_274, "ISOHybrid"), lmprintf(MSG_275, iso_image, dd_image, iso_image, dd_image), @@ -1451,7 +1453,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param) } if ((img_report.projected_size < MAX_ISO_TO_ESP_SIZE * MB) && HAS_REGULAR_EFI(img_report) && - (partition_type == PARTITION_STYLE_GPT) && IS_FAT(fs_type)) { + (partition_type == PARTITION_STYLE_GPT) && IS_FAT(fs_type) && !esp_already_asked) { // The ISO is small enough to be written as an ESP and we are using GPT // so ask the users if they want to write it as an ESP. char* iso_image = lmprintf(MSG_036); @@ -2379,6 +2381,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA partition_type = (int)ComboBox_GetCurItemData(hPartitionScheme); SetPartitionSchemeAndTargetSystem(TRUE); SetFileSystemAndClusterSize(NULL); + SetMBRProps(); EnableMBRBootOptions(TRUE, TRUE); selected_pt = partition_type; break; @@ -2778,21 +2781,23 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA break; case WM_DROPFILES: - droppedFileInfo = (HDROP)wParam; - wbuffer = calloc(MAX_PATH, sizeof(wchar_t)); - if (wbuffer == NULL) { - uprintf("Failed to alloc buffer for drag-n-drop"); - break; - } - DragQueryFileW(droppedFileInfo, 0, wbuffer, MAX_PATH); - safe_free(image_path); - image_path = wchar_to_utf8(wbuffer); - safe_free(wbuffer); + if (format_thread == NULL) { + droppedFileInfo = (HDROP)wParam; + wbuffer = calloc(MAX_PATH, sizeof(wchar_t)); + if (wbuffer == NULL) { + uprintf("Failed to alloc buffer for drag-n-drop"); + break; + } + DragQueryFileW(droppedFileInfo, 0, wbuffer, MAX_PATH); + safe_free(image_path); + image_path = wchar_to_utf8(wbuffer); + safe_free(wbuffer); - if (image_path != NULL) { - img_provided = TRUE; - // Simulate image selection click - SendMessage(hDlg, WM_COMMAND, IDC_SELECT, 0); + if (image_path != NULL) { + img_provided = TRUE; + // Simulate image selection click + SendMessage(hDlg, WM_COMMAND, IDC_SELECT, 0); + } } break; diff --git a/src/rufus.rc b/src/rufus.rc index 19e79452..64ac7174 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.14.1767" +CAPTION "Rufus 3.14.1768" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,14,1767,0 - PRODUCTVERSION 3,14,1767,0 + FILEVERSION 3,14,1768,0 + PRODUCTVERSION 3,14,1768,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.14.1767" + VALUE "FileVersion", "3.14.1768" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.14.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.14.1767" + VALUE "ProductVersion", "3.14.1768" END END BLOCK "VarFileInfo" diff --git a/src/ui.c b/src/ui.c index 7224d745..b860cca0 100644 --- a/src/ui.c +++ b/src/ui.c @@ -529,7 +529,7 @@ void AdjustForLowDPI(HWND hDlg) for (i = 0; i < ARRAYSIZE(adjust_dpi_ids); i++) { dy += ddy; // "...and the other thing I really like about Microsoft's UI handling is how " - //."you never have to introduce weird hardcoded constants all over the place, " + // "you never have to introduce weird hardcoded constants all over the place, " // "just to make your UI look good...", said NO ONE ever. if (adjust_dpi_ids[i][0] == IDC_QUICK_FORMAT) dy += 1;