We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19e3979 commit a882857Copy full SHA for a882857
Sources/FoundationEssentials/FileManager/FileOperations.swift
@@ -618,7 +618,7 @@ enum _FileOperations {
618
try destination.withNTPathRepresentation { pwszDestination in
619
var faDestinationAttributes: WIN32_FILE_ATTRIBUTE_DATA = .init()
620
if GetFileAttributesExW(pwszDestination, GetFileExInfoStandard, &faDestinationAttributes) {
621
- let error = CocoaError.moveFileError(GetLastError(), src, dst)
+ let error = CocoaError.moveFileError(ERROR_ALREADY_EXISTS, src, dst)
622
guard fileManager._shouldProceedAfter(error: error, movingItemAtPath: source, to: destination) else {
623
throw error
624
}
0 commit comments