From ff2548b559bdaab37ac22d6fdcf6223833e488b8 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 28 Jul 2018 11:59:44 +0100 Subject: [PATCH] [internal] align msapi_utf8.h to the one we use for libwdi --- src/msapi_utf8.h | 8 +++++++- src/rufus.rc | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/msapi_utf8.h b/src/msapi_utf8.h index 388fdfd2..e9316cf3 100644 --- a/src/msapi_utf8.h +++ b/src/msapi_utf8.h @@ -681,7 +681,13 @@ static __inline DWORD GetFileAttributesU(const char* lpFileName) { DWORD ret = 0xFFFFFFFF, err = ERROR_INVALID_DATA; wconvert(lpFileName); - ret = GetFileAttributesW(wlpFileName); + // Unlike Microsoft's version, ours doesn't fail if the string is quoted + if ((wlpFileName[0] == L'"') && (wlpFileName[wcslen(wlpFileName) - 1] == L'"')) { + wlpFileName[wcslen(wlpFileName) - 1] = 0; + ret = GetFileAttributesW(&wlpFileName[1]); + } else { + ret = GetFileAttributesW(wlpFileName); + } err = GetLastError(); wfree(lpFileName); SetLastError(err); diff --git a/src/rufus.rc b/src/rufus.rc index cfc10696..19151cdf 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 3.2.1361" +CAPTION "Rufus 3.2.1362" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -392,8 +392,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,2,1361,0 - PRODUCTVERSION 3,2,1361,0 + FILEVERSION 3,2,1362,0 + PRODUCTVERSION 3,2,1362,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -411,13 +411,13 @@ BEGIN VALUE "Comments", "https://akeo.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.2.1361" + VALUE "FileVersion", "3.2.1362" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus-3.2.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.2.1361" + VALUE "ProductVersion", "3.2.1362" END END BLOCK "VarFileInfo"