diff --git a/src/dev.c b/src/dev.c index b1f1cdf7..49a64570 100644 --- a/src/dev.c +++ b/src/dev.c @@ -420,9 +420,9 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save) /* For debugging user reports of HDDs vs UFDs */ //#define FORCED_DEVICE #ifdef FORCED_DEVICE -#define FORCED_VID 0x1058 -#define FORCED_PID 0x0702 -#define FORCED_NAME "WD 1200BEVExternal USB Device" +#define FORCED_VID 0x0781 +#define FORCED_PID 0x55A9 +#define FORCED_NAME " USB SanDisk 3.2Gen1 UAS Device" #endif void ClearDrives(void) diff --git a/src/hdd_vs_ufd.h b/src/hdd_vs_ufd.h index 2f632bc2..33941f76 100644 --- a/src/hdd_vs_ufd.h +++ b/src/hdd_vs_ufd.h @@ -88,7 +88,6 @@ static str_score_t str_score[] = { }; static str_score_t str_adjust[] = { - { "SSK Port able", -20 }, { "Gadget", -10 }, { "Flash", -10 }, { "SD-CARD", -10 }, @@ -96,7 +95,7 @@ static str_score_t str_adjust[] = { { "HDD", +20 }, { "SATA", +20 }, { "SCSI", +20 }, - { "SSD", +20 }, + { "SSD", +20 } }; /* The lists belows set a score according to VID & VID:PID @@ -210,7 +209,6 @@ static vidpid_score_t vidpid_score[] = { { 0x0c0b, 0xb159, 10 }, // Dura Micro 509 // Meh { 0x0e21, 0x0510, 5 }, // Cowon iAudio X5 - { 0x1058, 0x0702, 5 }, // WD 1200BEVExternal HDD { 0x11b0, 0x6298, 10 }, // Enclosure from Kingston SSDNow notebook upgrade kit // NOT in VID list as plenty of UFDs { 0x125f, 0xa93a, 10 }, // A-DATA SH93 diff --git a/src/net.c b/src/net.c index f0c61d9c..32cebdf7 100644 --- a/src/net.c +++ b/src/net.c @@ -173,7 +173,7 @@ uint64_t DownloadToFileOrBufferEx(const char* url, const char* file, const char* const char* accept_types[] = {"*/*\0", NULL}; const char* short_name; unsigned char buf[DOWNLOAD_BUFFER_SIZE]; - char hostname[64], urlpath[128], strsize[32], *bak_file = NULL; + char hostname[64], urlpath[128], strsize[32]; BOOL r = FALSE; DWORD dwSize, dwWritten, dwDownloaded; HANDLE hFile = INVALID_HANDLE_VALUE; @@ -198,13 +198,6 @@ uint64_t DownloadToFileOrBufferEx(const char* url, const char* file, const char* uprintf("Downloading %s", url); } - // If an old file with the same name exists, rename it so we can restore it in case of failure - if (file != NULL && PathFileExistsU((char*)file) && (bak_file = calloc(1, strlen(file) + 6)) != NULL) { - strcpy(bak_file, file); - strcat(bak_file, ".bak"); - MoveFileU(file, bak_file); - } - if ( (!InternetCrackUrlA(url, (DWORD)safe_strlen(url), 0, &UrlParts)) || (UrlParts.lpszHostName == NULL) || (UrlParts.lpszUrlPath == NULL)) { uprintf("Unable to decode URL: %s", WindowsErrorString()); @@ -334,12 +327,8 @@ out: if (!r) { if (file != NULL) DeleteFileU(file); - if (bak_file != NULL) - MoveFileU(bak_file, file); if (buffer != NULL) safe_free(*buffer); - } else if (bak_file != NULL) { - DeleteFileU(bak_file); } if (hRequest) InternetCloseHandle(hRequest); diff --git a/src/rufus.rc b/src/rufus.rc index e510b158..67f2e187 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -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 4.15.2403" +CAPTION "Rufus 4.15.2400" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -409,8 +409,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,15,2403,0 - PRODUCTVERSION 4,15,2403,0 + FILEVERSION 4,15,2400,0 + PRODUCTVERSION 4,15,2400,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -428,13 +428,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "4.15.2403" + VALUE "FileVersion", "4.15.2400" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2026 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-4.15.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "4.15.2403" + VALUE "ProductVersion", "4.15.2400" END END BLOCK "VarFileInfo" diff --git a/src/stdlg.c b/src/stdlg.c index cb29d32e..74dc7efe 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -1080,8 +1080,8 @@ static INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam } else switch (LOWORD(wParam)) { case IDOK: // Produce a big scary warning if the silent install option was selected - hCtrl = GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + selection_data[s].options->edition_index - 1); - if (selection_data[s].options->edition_index > 0 && IsWindowVisible(hCtrl) && Button_GetCheck(hCtrl)) { + if (selection_data[s].options->edition_index > 0 && + Button_GetCheck(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + selection_data[s].options->edition_index - 1))) { selection_dialog_options_t selection = { 0 }; selection.style = BS_AUTOCHECKBOX; selection.flags = SELECTION_NEEDS_ALL_TO_PROCEED | SELECTION_USE_WARNING_ICON; @@ -1095,8 +1095,7 @@ static INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam break; } for (r = 0, i = 0, m = 1; i < nDialogItems; i++, m <<= 1) - if (Button_GetCheck(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i)) == BST_CHECKED && - IsWindowVisible(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i))) + if (Button_GetCheck(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1 + i)) == BST_CHECKED) r += m; if (selection_data[s].options->username_index > 0) { GetWindowTextU(GetDlgItem(hDlg, IDC_SELECTION_USERNAME), unattend_username, MAX_USERNAME_LENGTH); diff --git a/src/wue.c b/src/wue.c index 2bc04b05..90367f51 100644 --- a/src/wue.c +++ b/src/wue.c @@ -150,7 +150,7 @@ char* CreateUnattendXml(int arch, int flags) fprintf(fd, " \n"); fprintf(fd, " \n"); if (flags & UNATTEND_SILENT_INSTALL) { - uprintf("• âš Silent Installâš "); + uprintf("• Silent Install"); // Automatically partition the disk and set the installation target fprintf(fd, " \n"); fprintf(fd, " OnError\n");