mirror of https://github.com/AxioDL/kabufuda.git
Use MoveFileEx for Win32 file renaming
This commit is contained in:
parent
3cf7aee617
commit
09e0582282
|
@ -319,7 +319,7 @@ static inline int Rename(const SystemChar* oldpath, const SystemChar* newpath)
|
||||||
{
|
{
|
||||||
#if CARD_UCS2
|
#if CARD_UCS2
|
||||||
//return _wrename(oldpath, newpath);
|
//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
|
#else
|
||||||
return rename(oldpath, newpath);
|
return rename(oldpath, newpath);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue