From 2d272b799117994f6c790d3b309fda1b47436583 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 5 Oct 2020 12:39:52 +0100 Subject: [PATCH] [iso] fix md5sum.txt update for Ubuntu 20.10 * Ubuntu switched to using GRUB for BIOS, so our update_md5sum() code was not being called. * Move update_md5sum() to being called unconditionally to fix this. * Closes #1616 (again...) --- ChangeLog.txt | 4 ++-- src/iso.c | 12 +++++++----- src/rufus.rc | 10 +++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index bb546e33..8eabef09 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,11 +2,11 @@ o Version 3.12 (2020.10.??) Add optional SHA-512 digest algorithm (Alt-H) Add a cheat mode (Alt +/-) to increase/decrease application priority Enable direct provision of install.wim/install.esd for Windows To Go - Move the ESP to the beginning of the drive for Windows To Go, on systems that allow it + Move Windows To Go ESP to the beginning of the drive, on systems that allow it Enforce a minimum volume size of 256 MB for ext2/ext3 partitions Speed up the scanning of ISOs with lots of Rock Ridge deep directory entries Fix detection of GRUB version and update embedded GRUB for Ubuntu 20.10 support - Fix user interface labels for accessibility + Fix user interface labels for accessibility Work around a Windows bug where the wrong drive letter may be returned o Version 3.11 (2020.06.18) diff --git a/src/iso.c b/src/iso.c index d23ad790..002c777e 100644 --- a/src/iso.c +++ b/src/iso.c @@ -598,16 +598,16 @@ static void update_md5sum(void) char md5_path[64], *md5_data = NULL, *str_pos; if (!img_report.has_md5sum) - return; + goto out; assert(img_report.has_md5sum <= ARRAYSIZE(md5sum_name)); if (img_report.has_md5sum > ARRAYSIZE(md5sum_name)) - return; + goto out; static_sprintf(md5_path, "%s\\%s", psz_extract_dir, md5sum_name[img_report.has_md5sum - 1]); md5_size = read_file(md5_path, (uint8_t**)&md5_data); if (md5_size == 0) - return; + goto out; for (i = 0; i < modified_path.Index; i++) { str_pos = strstr(md5_data, &modified_path.String[i][2]); @@ -635,6 +635,9 @@ static void update_md5sum(void) write_file(md5_path, md5_data, md5_size); free(md5_data); + +out: + StrArrayDestroy(&modified_path); } // Returns 0 on success, >0 on error, <0 to ignore current dir @@ -1108,12 +1111,11 @@ out: } if (fd != NULL) fclose(fd); - update_md5sum(); } else if (HAS_BOOTMGR(img_report) && enable_ntfs_compression) { // bootmgr might need to be uncompressed: https://github.com/pbatard/rufus/issues/1381 RunCommand("compact /u bootmgr* efi/boot/*.efi", dest_dir, TRUE); } - StrArrayDestroy(&modified_path); + update_md5sum(); if (archive_path != NULL) { uprintf("● Adding files from %s", archive_path); bled_init(NULL, NULL, NULL, NULL, alt_print_extracted_file, NULL); diff --git a/src/rufus.rc b/src/rufus.rc index 7a79210f..3c959073 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.12.1707" +CAPTION "Rufus 3.12.1708" 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,12,1707,0 - PRODUCTVERSION 3,12,1707,0 + FILEVERSION 3,12,1708,0 + PRODUCTVERSION 3,12,1708,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.12.1707" + VALUE "FileVersion", "3.12.1708" 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.12.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.12.1707" + VALUE "ProductVersion", "3.12.1708" END END BLOCK "VarFileInfo"