Use MoveFileEx for Win32 file renaming

This commit is contained in:
Jack Andersen 2017-11-05 20:57:34 -10:00
parent 3cf7aee617
commit 09e0582282
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ static inline int Rename(const SystemChar* oldpath, const SystemChar* newpath)
{
#if CARD_UCS2
//return _wrename(oldpath, newpath);
return ReplaceFileW(newpath, oldpath, nullptr, 0, nullptr, nullptr) == 0;
return MoveFileExW(oldpath, newpath, MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH) == 0;
#else
return rename(oldpath, newpath);
#endif