diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index 8f3ceebb28b..27baf827566 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -682,7 +682,7 @@ bool Path::getMagicNumber(std::string& Magic, unsigned len) const { bool Path::renamePathOnDisk(const Path& newName) { - if (!MoveFile(path.c_str(), newName.c_str())) + if (!MoveFileEx(path.c_str(), newName.c_str(), MOVEFILE_REPLACE_EXISTING)) ThrowError("Can't move '" + path + "' to '" + newName.path + "': "); return true;