Skip to content

Commit f018fde

Browse files
Fix atomic file rename in docker container mounted volumes
Fix atomic file rename in docker container mounted volumes
1 parent 50ed2bf commit f018fde

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Support/Windows/Path.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,11 @@ static std::error_code rename_internal(HANDLE FromHandle, const Twine &To,
479479
unsigned Error = GetLastError();
480480
if (Error == ERROR_SUCCESS)
481481
Error = ERROR_CALL_NOT_IMPLEMENTED; // Wine doesn't always set error code.
482+
else if (Error == ERROR_INVALID_PARAMETER) {
483+
// This operation can fail on file systems that do not properly support
484+
// the extended POSIX semantics for renames.
485+
Error = ERROR_CALL_NOT_IMPLEMENTED;
486+
}
482487
return mapWindowsError(Error);
483488
}
484489

0 commit comments

Comments
 (0)