mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[iso] fix file extraction for GRUB/Grub4DOS based ISOs
* We were switching the global boot type variable to something other than BT_IMAGE, which prevented ISO extraction whenever a GRUB secondary boot record was written. * Closes #1145
This commit is contained in:
		
							parent
							
								
									0b4146af56
								
							
						
					
					
						commit
						b274388f95
					
				
					 2 changed files with 9 additions and 9 deletions
				
			
		|  | @ -996,7 +996,7 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive) | ||||||
| { | { | ||||||
| 	// TODO: Do we need anything special for 4K sectors?
 | 	// TODO: Do we need anything special for 4K sectors?
 | ||||||
| 	DWORD size, max_size, mbr_size = 0x200; | 	DWORD size, max_size, mbr_size = 0x200; | ||||||
| 	int r; | 	int r, sub_type = bt; | ||||||
| 	unsigned char* buf = NULL; | 	unsigned char* buf = NULL; | ||||||
| 	FAKE_FD fake_fd = { 0 }; | 	FAKE_FD fake_fd = { 0 }; | ||||||
| 	FILE* fp = (FILE*)&fake_fd; | 	FILE* fp = (FILE*)&fake_fd; | ||||||
|  | @ -1010,12 +1010,12 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive) | ||||||
| 	// Syslinux has precedence over Grub
 | 	// Syslinux has precedence over Grub
 | ||||||
| 	if ((bt == BT_IMAGE) && (!HAS_SYSLINUX(img_report))) { | 	if ((bt == BT_IMAGE) && (!HAS_SYSLINUX(img_report))) { | ||||||
| 		if (img_report.has_grub4dos) | 		if (img_report.has_grub4dos) | ||||||
| 			bt = BT_GRUB4DOS; | 			sub_type = BT_GRUB4DOS; | ||||||
| 		if (img_report.has_grub2) | 		if (img_report.has_grub2) | ||||||
| 			bt = BT_GRUB2; | 			sub_type = BT_GRUB2; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	switch (bt) { | 	switch (sub_type) { | ||||||
| 	case BT_GRUB4DOS: | 	case BT_GRUB4DOS: | ||||||
| 		uprintf("Writing Grub4Dos SBR"); | 		uprintf("Writing Grub4Dos SBR"); | ||||||
| 		buf = GetResource(hMainInstance, MAKEINTRESOURCEA(IDR_GR_GRUB_GRLDR_MBR), _RT_RCDATA, "grldr.mbr", &size, FALSE); | 		buf = GetResource(hMainInstance, MAKEINTRESOURCEA(IDR_GR_GRUB_GRLDR_MBR), _RT_RCDATA, "grldr.mbr", &size, FALSE); | ||||||
|  |  | ||||||
							
								
								
									
										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.0.1305" | CAPTION "Rufus 3.0.1306" | ||||||
| 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 | ||||||
|  | @ -389,8 +389,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 3,0,1305,0 |  FILEVERSION 3,0,1306,0 | ||||||
|  PRODUCTVERSION 3,0,1305,0 |  PRODUCTVERSION 3,0,1306,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -407,13 +407,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" |             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "3.0.1305" |             VALUE "FileVersion", "3.0.1306" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" | ||||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" |             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||||
|             VALUE "OriginalFilename", "rufus.exe" |             VALUE "OriginalFilename", "rufus.exe" | ||||||
|             VALUE "ProductName", "Rufus" |             VALUE "ProductName", "Rufus" | ||||||
|             VALUE "ProductVersion", "3.0.1305" |             VALUE "ProductVersion", "3.0.1306" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue