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