diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2006-05-07 02:51:51 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2006-05-07 02:51:51 +0000 |
commit | e564de2d3746d0b7f62e2c82f27ebc24cc1ad9e4 (patch) | |
tree | 6818cd884af724c79baa41782a2f06e6a4a57751 /lib/System/Win32 | |
parent | 77f361f5b3ac6ed080d6b0f401b62cd6e08614e5 (diff) | |
download | external_llvm-e564de2d3746d0b7f62e2c82f27ebc24cc1ad9e4.zip external_llvm-e564de2d3746d0b7f62e2c82f27ebc24cc1ad9e4.tar.gz external_llvm-e564de2d3746d0b7f62e2c82f27ebc24cc1ad9e4.tar.bz2 |
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
Diffstat (limited to 'lib/System/Win32')
-rw-r--r-- | lib/System/Win32/Path.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index 8f3ceeb..27baf82 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; |