Commit 775458de authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'fix-atomic-rename-Windows-sharing-violation'

24bd7ae1 cmSystemTools::RenameFile: Retry on Windows ERROR_SHARING_VIOLATION
parents 07163ca0 24bd7ae1
......@@ -886,8 +886,10 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
// Try again only if failure was due to access permissions.
if(GetLastError() != ERROR_ACCESS_DENIED)
DWORD last_error = GetLastError();
// Try again only if failure was due to access/sharing permissions.
if(last_error != ERROR_ACCESS_DENIED &&
return false;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment