From e11113f802f7d0f651eaaaff90b4b5b5fd8a522c Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 23 Aug 2019 16:58:36 +0100 Subject: [PATCH] [ui] fix stale progress bar during standalone ext2/ext3 format * Also rename the FormatXXX function calls --- src/format.c | 12 ++++++------ src/rufus.rc | 10 +++++----- src/ui.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/format.c b/src/format.c index a1638fff..59f4d1d3 100644 --- a/src/format.c +++ b/src/format.c @@ -372,7 +372,7 @@ static DWORD GetFATSizeSectors(DWORD DskSize, DWORD ReservedSecCnt, DWORD SecPer * Large FAT32 volume formatting from fat32format by Tom Thornhill * http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm */ -static BOOL FormatFAT32(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterSize, LPCSTR FSName, LPCSTR Label, DWORD Flags) +static BOOL FormatLargeFAT32(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterSize, LPCSTR FSName, LPCSTR Label, DWORD Flags) { BOOL r = FALSE; DWORD i; @@ -1106,7 +1106,7 @@ out: /* * Call on VDS to format a partition */ -static BOOL FormatDriveVds(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterSize, LPCSTR FSName, LPCSTR Label, DWORD Flags) +static BOOL FormatNativeVds(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterSize, LPCSTR FSName, LPCSTR Label, DWORD Flags) { BOOL r = FALSE, bFoundVolume = FALSE; HRESULT hr; @@ -1352,7 +1352,7 @@ out: /* * Call on fmifs.dll's FormatEx() to format the drive */ -static BOOL FormatDrive(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterSize, LPCSTR FSName, LPCSTR Label, DWORD Flags) +static BOOL FormatNative(DWORD DriveIndex, uint64_t PartitionOffset, DWORD ClusterSize, LPCSTR FSName, LPCSTR Label, DWORD Flags) { BOOL r = FALSE; PF_DECL(FormatEx); @@ -1441,13 +1441,13 @@ static BOOL FormatPartition(DWORD DriveIndex, uint64_t PartitionOffset, DWORD Un } actual_fs_type = FSType; if ((FSType == FS_FAT32) && ((SelectedDrive.DiskSize > LARGE_FAT32_SIZE) || (force_large_fat32) || (Flags & FP_LARGE_FAT32))) - return FormatFAT32(DriveIndex, PartitionOffset, UnitAllocationSize, FileSystemLabel[FSType], Label, Flags); + return FormatLargeFAT32(DriveIndex, PartitionOffset, UnitAllocationSize, FileSystemLabel[FSType], Label, Flags); else if (FSType >= FS_EXT2) return FormatExtFs(DriveIndex, PartitionOffset, UnitAllocationSize, FileSystemLabel[FSType], Label, Flags); else if (use_vds) - return FormatDriveVds(DriveIndex, PartitionOffset, UnitAllocationSize, FileSystemLabel[FSType], Label, Flags); + return FormatNativeVds(DriveIndex, PartitionOffset, UnitAllocationSize, FileSystemLabel[FSType], Label, Flags); else - return FormatDrive(DriveIndex, PartitionOffset, UnitAllocationSize, FileSystemLabel[FSType], Label, Flags); + return FormatNative(DriveIndex, PartitionOffset, UnitAllocationSize, FileSystemLabel[FSType], Label, Flags); } /* diff --git a/src/rufus.rc b/src/rufus.rc index 58ae79ae..9b0d504d 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.7.1566" +CAPTION "Rufus 3.7.1567" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -394,8 +394,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,7,1566,0 - PRODUCTVERSION 3,7,1566,0 + FILEVERSION 3,7,1567,0 + PRODUCTVERSION 3,7,1567,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -413,13 +413,13 @@ BEGIN VALUE "Comments", "https://akeo.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.7.1566" + VALUE "FileVersion", "3.7.1567" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus-3.7.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.7.1566" + VALUE "ProductVersion", "3.7.1567" END END BLOCK "VarFileInfo" diff --git a/src/ui.c b/src/ui.c index fa1d4c7b..705d3b80 100644 --- a/src/ui.c +++ b/src/ui.c @@ -1183,7 +1183,7 @@ void InitProgress(BOOL bOnlyFormat) // So, yeah, if you're doing slow format, or using Large FAT32, and have persistence, you'll see // the progress bar revert during format on account that we reuse the same operation for both // partitions. Maybe one day I'll be bothered to handle two separate OP_FORMAT ops... - if ((!IsChecked(IDC_QUICK_FORMAT)) || (persistence_size != 0) || + if ((!IsChecked(IDC_QUICK_FORMAT)) || (persistence_size != 0) || (fs_type >= FS_EXT2) || ((fs_type == FS_FAT32) && ((SelectedDrive.DiskSize >= LARGE_FAT32_SIZE) || (force_large_fat32)))) { nb_slots[OP_FORMAT] = -1; nb_slots[OP_CREATE_FS] = 0;