Commit 09e05822 authored by Jack Andersen's avatar Jack Andersen

Use MoveFileEx for Win32 file renaming

parent 3cf7aee6
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment