mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[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...)
This commit is contained in:
		
							parent
							
								
									f4c7f2963c
								
							
						
					
					
						commit
						2d272b7991
					
				
					 3 changed files with 14 additions and 12 deletions
				
			
		|  | @ -2,7 +2,7 @@ o Version 3.12 (2020.10.??) | ||||||
|     Add optional SHA-512 digest algorithm (Alt-H) |     Add optional SHA-512 digest algorithm (Alt-H) | ||||||
|     Add a cheat mode (Alt +/-) to increase/decrease application priority |     Add a cheat mode (Alt +/-) to increase/decrease application priority | ||||||
|     Enable direct provision of install.wim/install.esd for Windows To Go |     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 |     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 |     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 detection of GRUB version and update embedded GRUB for Ubuntu 20.10 support | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								src/iso.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/iso.c
									
										
									
									
									
								
							|  | @ -598,16 +598,16 @@ static void update_md5sum(void) | ||||||
| 	char md5_path[64], *md5_data = NULL, *str_pos; | 	char md5_path[64], *md5_data = NULL, *str_pos; | ||||||
| 
 | 
 | ||||||
| 	if (!img_report.has_md5sum) | 	if (!img_report.has_md5sum) | ||||||
| 		return; | 		goto out; | ||||||
| 
 | 
 | ||||||
| 	assert(img_report.has_md5sum <= ARRAYSIZE(md5sum_name)); | 	assert(img_report.has_md5sum <= ARRAYSIZE(md5sum_name)); | ||||||
| 	if (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]); | 	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); | 	md5_size = read_file(md5_path, (uint8_t**)&md5_data); | ||||||
| 	if (md5_size == 0) | 	if (md5_size == 0) | ||||||
| 		return; | 		goto out; | ||||||
| 
 | 
 | ||||||
| 	for (i = 0; i < modified_path.Index; i++) { | 	for (i = 0; i < modified_path.Index; i++) { | ||||||
| 		str_pos = strstr(md5_data, &modified_path.String[i][2]); | 		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); | 	write_file(md5_path, md5_data, md5_size); | ||||||
| 	free(md5_data); | 	free(md5_data); | ||||||
|  | 
 | ||||||
|  | out: | ||||||
|  | 	StrArrayDestroy(&modified_path); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // Returns 0 on success, >0 on error, <0 to ignore current dir
 | // Returns 0 on success, >0 on error, <0 to ignore current dir
 | ||||||
|  | @ -1108,12 +1111,11 @@ out: | ||||||
| 			} | 			} | ||||||
| 			if (fd != NULL) | 			if (fd != NULL) | ||||||
| 				fclose(fd); | 				fclose(fd); | ||||||
| 			update_md5sum(); |  | ||||||
| 		} else if (HAS_BOOTMGR(img_report) && enable_ntfs_compression) { | 		} else if (HAS_BOOTMGR(img_report) && enable_ntfs_compression) { | ||||||
| 			// bootmgr might need to be uncompressed: https://github.com/pbatard/rufus/issues/1381
 | 			// bootmgr might need to be uncompressed: https://github.com/pbatard/rufus/issues/1381
 | ||||||
| 			RunCommand("compact /u bootmgr* efi/boot/*.efi", dest_dir, TRUE); | 			RunCommand("compact /u bootmgr* efi/boot/*.efi", dest_dir, TRUE); | ||||||
| 		} | 		} | ||||||
| 		StrArrayDestroy(&modified_path); | 		update_md5sum(); | ||||||
| 		if (archive_path != NULL) { | 		if (archive_path != NULL) { | ||||||
| 			uprintf("● Adding files from %s", archive_path); | 			uprintf("● Adding files from %s", archive_path); | ||||||
| 			bled_init(NULL, NULL, NULL, NULL, alt_print_extracted_file, NULL); | 			bled_init(NULL, NULL, NULL, NULL, alt_print_extracted_file, NULL); | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 232, 326 | IDD_DIALOG DIALOGEX 12, 12, 232, 326 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| EXSTYLE WS_EX_ACCEPTFILES | EXSTYLE WS_EX_ACCEPTFILES | ||||||
| CAPTION "Rufus 3.12.1707" | CAPTION "Rufus 3.12.1708" | ||||||
| FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | ||||||
| BEGIN | BEGIN | ||||||
|     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP |     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP | ||||||
|  | @ -395,8 +395,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 3,12,1707,0 |  FILEVERSION 3,12,1708,0 | ||||||
|  PRODUCTVERSION 3,12,1707,0 |  PRODUCTVERSION 3,12,1708,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -414,13 +414,13 @@ BEGIN | ||||||
|             VALUE "Comments", "https://rufus.ie" |             VALUE "Comments", "https://rufus.ie" | ||||||
|             VALUE "CompanyName", "Akeo Consulting" |             VALUE "CompanyName", "Akeo Consulting" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "3.12.1707" |             VALUE "FileVersion", "3.12.1708" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)" | ||||||
|             VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" |             VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" | ||||||
|             VALUE "OriginalFilename", "rufus-3.12.exe" |             VALUE "OriginalFilename", "rufus-3.12.exe" | ||||||
|             VALUE "ProductName", "Rufus" |             VALUE "ProductName", "Rufus" | ||||||
|             VALUE "ProductVersion", "3.12.1707" |             VALUE "ProductVersion", "3.12.1708" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue