This repository was archived by the owner on Aug 8, 2024. It is now read-only.
Cherry-pick dotnet/corefx#37583.#375
Merged
akoeplinger merged 1 commit intomono:masterfrom Dec 10, 2019
Merged
Conversation
Use clonefile for CopyFile, if available (dotnet#37583) * Rework SystemNative_CopyFile to use paths instead of file descriptors Use clonefile for CopyFile, if available * Bail out in SystemNative_CopyFile if access fails. We don't want to proceed if the destination file is read-only. * Handle a race condition where clonefile can result in EEXIST error * Update comment about fcopyfile * Update PathInternal.TrimEndingDirectorySeparator to Path.TrimEndingDirectorySeparator * Add missing close(outFd) call * Remove unnecessary ! operator * Save errno around close(outFd) calls * access already sets EACCESS errno, just keep it * Remove fcopyfile support * Open destination file with O_CLOEXEC * Return correct error code for source == destination * Rearrange error handling a bit * Remove forgotten HAVE_FCOPYFILE (cherry picked from commit 5f45a8d)
akoeplinger
approved these changes
Dec 10, 2019
baulig
pushed a commit
to baulig/corefx
that referenced
this pull request
Dec 13, 2019
Revert "Revert "Cherry-pick dotnet#37583. (mono#375)" (mono#382)" This reverts commit 796b89e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use clonefile for CopyFile, if available (dotnet#37583)
Use clonefile for CopyFile, if available
Bail out in SystemNative_CopyFile if access fails. We don't want to proceed if the destination file is read-only.
Handle a race condition where clonefile can result in EEXIST error
Update comment about fcopyfile
Update PathInternal.TrimEndingDirectorySeparator to Path.TrimEndingDirectorySeparator
Add missing close(outFd) call
Remove unnecessary ! operator
Save errno around close(outFd) calls
access already sets EACCESS errno, just keep it
Remove fcopyfile support
Open destination file with O_CLOEXEC
Return correct error code for source == destination
Rearrange error handling a bit
Remove forgotten HAVE_FCOPYFILE
(cherry picked from commit 5f45a8d)