From e564de2d3746d0b7f62e2c82f27ebc24cc1ad9e4 Mon Sep 17 00:00:00 2001 From: Jeff Cohen Date: Sun, 7 May 2006 02:51:51 +0000 Subject: [PATCH] Unlike Unix, Windows won't let a file be implicitly replaced via renaming without explicit permission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28157 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/System/Win32/Path.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.34.1