diff --git a/src/format.c b/src/format.c index 7c6d559e..5d1e9353 100644 --- a/src/format.c +++ b/src/format.c @@ -1793,7 +1793,7 @@ DWORD WINAPI FormatThread(void* param) FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_BADBLOCKS_FAILURE); ClearMBRGPT(hPhysicalDrive, SelectedDrive.DiskSize, SelectedDrive.SectorSize, FALSE); fclose(log_fd); - _unlink(logfile); + _unlinkU(logfile); goto out; } uprintf("Bad Blocks: Check completed, %d bad block%s found. (%d/%d/%d errors)\n", @@ -1820,7 +1820,7 @@ DWORD WINAPI FormatThread(void* param) } else { // We didn't get any errors => delete the log file fclose(log_fd); - _unlink(logfile); + _unlinkU(logfile); } } while (r == IDRETRY); if (r == IDABORT) { diff --git a/src/iso.c b/src/iso.c index 4f49538e..c2f03874 100644 --- a/src/iso.c +++ b/src/iso.c @@ -829,7 +829,7 @@ out: } free(buf); } - _unlink(isolinux_tmp); + _unlinkU(isolinux_tmp); } if (img_report.sl_version != 0) { static_sprintf(img_report.sl_version_str, "%d.%02d", @@ -865,7 +865,7 @@ out: uprintf(" Checking txtsetup.sif:\n OsLoadOptions = %s", tmp); img_report.uses_minint = (strstr(tmp, "/minint") != NULL); } - _unlink(tmp_sif); + _unlinkU(tmp_sif); safe_free(tmp); } if (HAS_INSTALL_WIM(img_report)) { @@ -886,7 +886,7 @@ out: GetGrubVersion(buf, size); } free(buf); - _unlink(path); + _unlinkU(path); } if (img_report.grub2_version[0] != 0) uprintf(" Detected Grub version: %s", img_report.grub2_version); diff --git a/src/msapi_utf8.h b/src/msapi_utf8.h index d220fc2e..457d8039 100644 --- a/src/msapi_utf8.h +++ b/src/msapi_utf8.h @@ -948,6 +948,15 @@ static __inline int _openU(const char *filename, int oflag , int pmode) } #endif +static __inline int _unlinkU(const char *path) +{ + int ret; + wconvert(path); + ret = _wunlink(wpath); + wfree(path); + return ret; +} + static __inline int _stat64U(const char *path, struct __stat64 *buffer) { int ret; diff --git a/src/net.c b/src/net.c index 453851a2..29a2da93 100644 --- a/src/net.c +++ b/src/net.c @@ -358,7 +358,7 @@ out: if (fd != NULL) fclose(fd); if (!r) { if (file != NULL) - _unlink(file); + _unlinkU(file); if (PromptOnError) { PrintInfo(0, MSG_242); SetLastError(error_code); diff --git a/src/rufus.rc b/src/rufus.rc index 149353e8..3f553eea 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.17.1185" +CAPTION "Rufus 2.17.1186" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -366,8 +366,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,17,1185,0 - PRODUCTVERSION 2,17,1185,0 + FILEVERSION 2,17,1186,0 + PRODUCTVERSION 2,17,1186,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -384,13 +384,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.17.1185" + VALUE "FileVersion", "2.17.1186" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.17.1185" + VALUE "ProductVersion", "2.17.1186" END END BLOCK "VarFileInfo"