mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 22:20:37 +00:00
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
This commit is contained in:
parent
77f361f5b3
commit
e564de2d37
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user