diff --git a/src/iso.c b/src/iso.c index a4090bc6..e69ac990 100644 --- a/src/iso.c +++ b/src/iso.c @@ -121,8 +121,11 @@ static BOOL check_iso_props(const char* psz_dirname, BOOL* is_syslinux_cfg, BOOL // Check for an isolinux/syslinux config file anywhere *is_syslinux_cfg = FALSE; for (i=0; i '%s'\n", psz_fullpath, iso_report.label, iso_report.usb_label); + // Fix dual BIOS + EFI support for tails and other ISOs + if ( (safe_stricmp(psz_path, efi_dirname) == 0) && (safe_stricmp(psz_basename, syslinux_cfg[0]) == 0) && + (!iso_report.has_efi_syslinux) && (dst = safe_strdup(psz_fullpath)) ) { + dst[nul_pos-12] = 's'; dst[nul_pos-11] = 'y'; dst[nul_pos-10] = 's'; + CopyFileA(psz_fullpath, dst, TRUE); + uprintf("Duplicated %s to %s\n", psz_fullpath, dst); + free(dst); + } } } safe_free(psz_fullpath); @@ -332,7 +343,7 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path) DWORD buf_size, wr_size, err; BOOL s, is_syslinux_cfg, is_old_c32[NB_OLD_C32], is_symlink; int i_length, r = 1; - char tmp[128], psz_fullpath[1024], *psz_basename; + char tmp[128], psz_fullpath[MAX_PATH], *psz_basename, *dst; const char *psz_iso_name = &psz_fullpath[strlen(psz_extract_dir)]; unsigned char buf[ISO_BLOCKSIZE]; CdioListNode_t* p_entnode; @@ -397,7 +408,8 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path) safe_sprintf(&psz_fullpath[nul_pos], 24, " (%s)", SizeToHumanReadable(i_file_length, FALSE, FALSE)); SetWindowTextU(hISOFileName, psz_fullpath); // ISO9660 cannot handle backslashes - for (i=0; i '%s'\n", psz_fullpath, iso_report.label, iso_report.usb_label); + // Fix dual BIOS + EFI support for tails and other ISOs + if ( (safe_stricmp(psz_path, efi_dirname) == 0) && (safe_stricmp(psz_basename, syslinux_cfg[0]) == 0) && + (!iso_report.has_efi_syslinux) && (dst = safe_strdup(psz_fullpath)) ) { + dst[nul_pos-12] = 's'; dst[nul_pos-11] = 'y'; dst[nul_pos-10] = 's'; + CopyFileA(psz_fullpath, dst, TRUE); + uprintf("Duplicated %s to %s\n", psz_fullpath, dst); + free(dst); + } } } } diff --git a/src/rufus.h b/src/rufus.h index ebfd99da..2f1086a4 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -246,6 +246,7 @@ typedef struct { BOOL has_autorun; BOOL has_old_c32[NB_OLD_C32]; BOOL has_old_vesamenu; + BOOL has_efi_syslinux; BOOL has_kolibrios; BOOL uses_minint; BOOL is_bootable_img; diff --git a/src/rufus.rc b/src/rufus.rc index 05033f08..0d450f2d 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 206, 329 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Rufus 1.4.11.518" +CAPTION "Rufus 1.4.11.519" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 @@ -165,7 +165,7 @@ END RTL_IDD_DIALOG DIALOGEX 12, 12, 206, 329 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL -CAPTION "Rufus 1.4.11.518" +CAPTION "Rufus 1.4.11.519" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 @@ -428,8 +428,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,4,11,518 - PRODUCTVERSION 1,4,11,518 + FILEVERSION 1,4,11,519 + PRODUCTVERSION 1,4,11,519 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -446,13 +446,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "1.4.11.518" + VALUE "FileVersion", "1.4.11.519" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "1.4.11.518" + VALUE "ProductVersion", "1.4.11.519" END END BLOCK "VarFileInfo"