summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-16 20:24:02 (GMT)
committerBrad King <brad.king@kitware.com>2020-12-17 13:35:38 (GMT)
commit92021198e532052739ac57b0dbf75c183eae41f1 (patch)
tree499b250ee7c668c8defa00d24d162fbdf307a25c
parent0932b1c2b29f4ad1228fa71bf4f5c089474d9882 (diff)
downloadCMake-92021198e532052739ac57b0dbf75c183eae41f1.zip
CMake-92021198e532052739ac57b0dbf75c183eae41f1.tar.gz
CMake-92021198e532052739ac57b0dbf75c183eae41f1.tar.bz2
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
-rw-r--r--Source/cmSystemTools.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 97440d2..6a705f4 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -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