Call unicode API on Windows

This commit is contained in:
Chun Kuan Lee 2018-08-06 01:32:11 +00:00
parent 362518791a
commit d38bf9105d
2 changed files with 7 additions and 5 deletions

View file

@ -997,7 +997,7 @@ void CreatePidFile(const fs::path &path, pid_t pid)
bool RenameOver(fs::path src, fs::path dest)
{
#ifdef WIN32
return MoveFileExA(src.string().c_str(), dest.string().c_str(),
return MoveFileExW(src.wstring().c_str(), dest.wstring().c_str(),
MOVEFILE_REPLACE_EXISTING) != 0;
#else
int rc = std::rename(src.string().c_str(), dest.string().c_str());