[misc] Fix various issues

* Attempt to remount the drive in case of failure (Closes #270)
* Minor fixes to localization
* Fix errors not being properly reported in DownloadFile()
* Also update ChangeLog.txt for beta
This commit is contained in:
Pete Batard 2014-01-05 19:54:19 +00:00
parent 573ea45640
commit d828500af7
5 changed files with 40 additions and 17 deletions

View file

@ -1482,6 +1482,14 @@ out:
SendMessage(hISOProgressDlg, UM_ISO_EXIT, 0, 0);
safe_unlockclose(hLogicalVolume);
safe_unlockclose(hPhysicalDrive); // This can take a while
if (IS_ERROR(FormatStatus)) {
guid_volume = GetLogicalName(DriveIndex, TRUE, FALSE);
if (guid_volume != NULL) {
if (MountVolume(drive_name, guid_volume))
uprintf("Re-mounted volume as '%c:' after error\n", drive_name[0]);
free(guid_volume);
}
}
PostMessage(hMainDialog, UM_FORMAT_COMPLETED, 0, 0);
ExitThread(0);
}

View file

@ -268,7 +268,7 @@ BOOL DownloadFile(const char* url, const char* file, HWND hProgressDialog)
uprintf("Downloading %s from %s\n", file, url);
if (!InternetCrackUrlA(url, (DWORD)safe_strlen(url), 0, &UrlParts)) {
uprintf("Unable to decode URL: %s\n", WindowsErrorString());
uprintf("Unable to decode URL: %s\n", WinInetErrorString());
goto out;
}
hostname[sizeof(hostname)-1] = 0;
@ -300,7 +300,7 @@ BOOL DownloadFile(const char* url, const char* file, HWND hProgressDialog)
INTERNET_FLAG_HYPERLINK|INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP|INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS|INTERNET_FLAG_NO_COOKIES|
INTERNET_FLAG_NO_UI|INTERNET_FLAG_NO_CACHE_WRITE, (DWORD_PTR)NULL);
if (hRequest == NULL) {
uprintf("Could not open url %s: %s\n", url, WindowsErrorString());
uprintf("Could not open url %s: %s\n", url, WinInetErrorString());
goto out;
}

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.4.2.371"
CAPTION "Rufus v1.4.2.372"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -288,8 +288,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,2,371
PRODUCTVERSION 1,4,2,371
FILEVERSION 1,4,2,372
PRODUCTVERSION 1,4,2,372
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -306,13 +306,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.4.2.371"
VALUE "FileVersion", "1.4.2.372"
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.2.371"
VALUE "ProductVersion", "1.4.2.372"
END
END
BLOCK "VarFileInfo"