[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:
Pete Batard 2018-06-04 12:10:23 +01:00
parent 0b4146af56
commit b274388f95
2 changed files with 9 additions and 9 deletions

View File

@ -996,7 +996,7 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive)
{
// TODO: Do we need anything special for 4K sectors?
DWORD size, max_size, mbr_size = 0x200;
int r;
int r, sub_type = bt;
unsigned char* buf = NULL;
FAKE_FD fake_fd = { 0 };
FILE* fp = (FILE*)&fake_fd;
@ -1010,12 +1010,12 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive)
// Syslinux has precedence over Grub
if ((bt == BT_IMAGE) && (!HAS_SYSLINUX(img_report))) {
if (img_report.has_grub4dos)
bt = BT_GRUB4DOS;
sub_type = BT_GRUB4DOS;
if (img_report.has_grub2)
bt = BT_GRUB2;
sub_type = BT_GRUB2;
}
switch (bt) {
switch (sub_type) {
case BT_GRUB4DOS:
uprintf("Writing Grub4Dos SBR");
buf = GetResource(hMainInstance, MAKEINTRESOURCEA(IDR_GR_GRUB_GRLDR_MBR), _RT_RCDATA, "grldr.mbr", &size, FALSE);

View File

@ -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.0.1305"
CAPTION "Rufus 3.0.1306"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -389,8 +389,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,0,1305,0
PRODUCTVERSION 3,0,1305,0
FILEVERSION 3,0,1306,0
PRODUCTVERSION 3,0,1306,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -407,13 +407,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.0.1305"
VALUE "FileVersion", "3.0.1306"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.0.1305"
VALUE "ProductVersion", "3.0.1306"
END
END
BLOCK "VarFileInfo"