mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-17 08:36:52 +00:00
Unlike Unix, Windows won't let a file be implicitly replaced via renaming without explicit permission.
llvm-svn: 28157
This commit is contained in:
parent
dc94b738d0
commit
44ece070c7
@ -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