mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-25 04:04:26 -04:00
[core] fix Boot selection dropdown not being reset on unsupported images
* Closes #1903
This commit is contained in:
parent
d029551929
commit
f5abae6442
2 changed files with 12 additions and 10 deletions
12
src/rufus.c
12
src/rufus.c
|
@ -1289,6 +1289,13 @@ DWORD WINAPI ImageScanThread(LPVOID param)
|
||||||
(img_report.image_size == 0) ||
|
(img_report.image_size == 0) ||
|
||||||
(!img_report.is_iso && (img_report.is_bootable_img <= 0) && !img_report.is_windows_img)) {
|
(!img_report.is_iso && (img_report.is_bootable_img <= 0) && !img_report.is_windows_img)) {
|
||||||
// Failed to scan image
|
// Failed to scan image
|
||||||
|
if (img_report.is_bootable_img < 0)
|
||||||
|
MessageBoxExU(hMainDialog, lmprintf(MSG_325, image_path), lmprintf(MSG_042), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
|
||||||
|
else
|
||||||
|
MessageBoxExU(hMainDialog, lmprintf(MSG_082), lmprintf(MSG_081), MB_OK | MB_ICONINFORMATION | MB_IS_RTL, selected_langid);
|
||||||
|
// Make sure to relinquish image_path before we call UpdateImage
|
||||||
|
// otherwise the boot selection dropdown won't be properly reset.
|
||||||
|
safe_free(image_path);
|
||||||
SendMessage(hMainDialog, UM_PROGRESS_EXIT, 0, 0);
|
SendMessage(hMainDialog, UM_PROGRESS_EXIT, 0, 0);
|
||||||
UpdateImage(FALSE);
|
UpdateImage(FALSE);
|
||||||
SetMBRProps();
|
SetMBRProps();
|
||||||
|
@ -1296,11 +1303,6 @@ DWORD WINAPI ImageScanThread(LPVOID param)
|
||||||
PrintInfoDebug(0, MSG_203);
|
PrintInfoDebug(0, MSG_203);
|
||||||
PrintStatus(0, MSG_203);
|
PrintStatus(0, MSG_203);
|
||||||
EnableControls(TRUE, FALSE);
|
EnableControls(TRUE, FALSE);
|
||||||
if (img_report.is_bootable_img < 0)
|
|
||||||
MessageBoxExU(hMainDialog, lmprintf(MSG_325, image_path), lmprintf(MSG_042), MB_OK | MB_ICONERROR | MB_IS_RTL, selected_langid);
|
|
||||||
else
|
|
||||||
MessageBoxExU(hMainDialog, lmprintf(MSG_082), lmprintf(MSG_081), MB_OK | MB_ICONINFORMATION | MB_IS_RTL, selected_langid);
|
|
||||||
safe_free(image_path);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
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.19.1884"
|
CAPTION "Rufus 3.19.1885"
|
||||||
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,19,1884,0
|
FILEVERSION 3,19,1885,0
|
||||||
PRODUCTVERSION 3,19,1884,0
|
PRODUCTVERSION 3,19,1885,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.19.1884"
|
VALUE "FileVersion", "3.19.1885"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2022 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.19.exe"
|
VALUE "OriginalFilename", "rufus-3.19.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.19.1884"
|
VALUE "ProductVersion", "3.19.1885"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue