1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Update File_WIN32U.cpp

This commit is contained in:
Sandu Liviu Catalin 2021-04-20 19:24:34 +03:00
parent 4c2509b535
commit c74f0a0eb0

View File

@ -309,7 +309,7 @@ void FileImpl::renameToImpl(const std::string& path, int options)
std::wstring upath; std::wstring upath;
convertPath(path, upath); convertPath(path, upath);
if (options & OPT_FAIL_ON_OVERWRITE_IMPL) { if (options & OPT_FAIL_ON_OVERWRITE_IMPL) {
if (MoveFileExW(_upath.c_str(), upath.c_str(), NULL) == 0) if (MoveFileExW(_upath.c_str(), upath.c_str(), 0) == 0)
handleLastErrorImpl(_path); handleLastErrorImpl(_path);
} else { } else {
if (MoveFileExW(_upath.c_str(), upath.c_str(), MOVEFILE_REPLACE_EXISTING) == 0) if (MoveFileExW(_upath.c_str(), upath.c_str(), MOVEFILE_REPLACE_EXISTING) == 0)