From 0085c4a464a4b0128f7e541a352973ba5448e283 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Wed, 22 Apr 2020 12:08:18 +0100 Subject: [PATCH] v3.10 (build 1647) * Also fix SBR message not being written for bootable images * Also add an extra partition refresh after deleting partitions to try to further force Windows take its stinking paws off our drive. --- ChangeLog.txt | 11 ++++++----- res/appstore/AppxManifest.xml | 2 +- src/format.c | 14 ++++++++------ src/rufus.rc | 10 +++++----- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 77de3cd0..49c86cb6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,11 +1,12 @@ -o Version 3.10 (2020.04.??) - Improve Ubuntu 20.04 support +o Version 3.10 (2020.04.22) + Improve support for Ubuntu 20.04 Improve detection of FIXED drives with no mounted partitions + Improve extfs formatting Update UEFI:NTFS file system drivers to v1.5 - Fix progress not being updated for German locale - Fix primary GPT being overwritten when adding the protective message MBR + Fix progress not being updated when using the German localization + Fix primary GPT being overwritten when adding the protective MBR message Fix a regression with lousy security solutions that prevent the creation of an 'autorun.inf' - Fix an assert during FreeDOS drive creation when the Windows system locale is UTF-8 + Fix an assert during FreeDOS drive creation when the Windows system locale is set to UTF-8 Fix invalid label errors when using a non-Western locale o Version 3.9 (2020.02.29) diff --git a/res/appstore/AppxManifest.xml b/res/appstore/AppxManifest.xml index 70da77da..1e4aa105 100644 --- a/res/appstore/AppxManifest.xml +++ b/res/appstore/AppxManifest.xml @@ -8,7 +8,7 @@ for an interesting struggle, when you also happen to have a comma in one of the fields... --> diff --git a/src/format.c b/src/format.c index 6287f9d1..e6f6b011 100644 --- a/src/format.c +++ b/src/format.c @@ -920,13 +920,12 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive) sub_type = BT_GRUB4DOS; if (img_report.has_grub2) sub_type = BT_GRUB2; - } else if (partition_type == PARTITION_STYLE_GPT) { - sub_type = BT_NON_BOOTABLE; - } else { - // Needed to prevent protective message to be written for MBR mode - sub_type = BT_MAX; } + // Use BT_MAX for the protective message + if (partition_type == PARTITION_STYLE_GPT) + sub_type = BT_MAX; + switch (sub_type) { case BT_GRUB4DOS: uprintf("Writing Grub4Dos SBR"); @@ -953,7 +952,7 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive) } } break; - case BT_NON_BOOTABLE: + case BT_MAX: uprintf("Writing protective message SBR"); size = 4 * KB; br_size = 17 * KB; // 34 sectors are reserved for protective MBR + primary GPT @@ -1790,6 +1789,9 @@ DWORD WINAPI FormatThread(void* param) FormatStatus = 0; } + // An extra refresh of the (now empty) partition data here appears to be helpful + GetDrivePartitionData(SelectedDrive.DeviceNumber, fs_name, sizeof(fs_name), TRUE); + // Now get RW access to the physical drive... hPhysicalDrive = GetPhysicalHandle(DriveIndex, actual_lock_drive, TRUE, !actual_lock_drive); if (hPhysicalDrive == INVALID_HANDLE_VALUE) { diff --git a/src/rufus.rc b/src/rufus.rc index d7995aeb..c02c2d65 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.10.1646" +CAPTION "Rufus 3.10.1647" 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,10,1646,0 - PRODUCTVERSION 3,10,1646,0 + FILEVERSION 3,10,1647,0 + PRODUCTVERSION 3,10,1647,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.10.1646" + VALUE "FileVersion", "3.10.1647" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.10.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.10.1646" + VALUE "ProductVersion", "3.10.1647" END END BLOCK "VarFileInfo"