From 92021198e532052739ac57b0dbf75c183eae41f1 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 16 Dec 2020 15:24:02 -0500 Subject: 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 --- Source/cmSystemTools.cxx | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v0.12