mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
cmSystemTools: Revert use of MOVEFILE_WRITE_THROUGH by RenameFile on Windows
Revert commit d78c22aa64 (cmSystemTools: Improve RenameFile on Windows
with MOVEFILE_WRITE_THROUGH, 2020-08-25, v3.19.0-rc1~243^2~3). Using
this flag causes the operation to fail frequently in some environments.
Drop it for now pending further investigation.
Fixes: #21571
This commit is contained in:
@@ -952,9 +952,8 @@ bool cmMoveFile(std::wstring const& oldname, std::wstring const& newname)
|
||||
SetLastError(0);
|
||||
|
||||
// Use MOVEFILE_REPLACE_EXISTING to replace an existing destination file.
|
||||
// Use MOVEFILE_WRITE_THROUGH to flush the change to disk before returning.
|
||||
return MoveFileExW(oldname.c_str(), newname.c_str(),
|
||||
MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH);
|
||||
MOVEFILE_REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user