1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[misc] use UTF-8 compatible _unlinkU() when deleting files

This commit is contained in:
Pete Batard 2017-08-30 11:24:47 +01:00
parent bf09842fd2
commit fe3004d17f
5 changed files with 20 additions and 11 deletions

View file

@ -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) {

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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"