Repository navigation
Conversation
Inspect source links without following them when COPYFILE_SYM is requested, before rejecting directories. This makes the documented option recreate link text instead of copying the referent, including dangling and directory links. Preserve requested link timestamps and report link-creation errors without overwriting the destination. Cover direct calls, destination directories, normal dereferencing and the existing rsync file caller.
Owner
|
Hand merged with fuzz due to unwanted behavioral changes, which are now opt-in. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
copyfile(..., LITE_FOPT_COPYFILE_SYM)currently follows the source withstat(), making its symlink branch unreachable. It copies a file link's referent, rejects directory links and cannot recreate dangling links. This also affectsrsync()'s single-file copying path.Inspect the link itself when the option is set, preserve its target text and requested modification time, and retain errors from failed link creation. Stage existing
rsync()destination replacements beside the destination and rename them into place, so repeated synchronization updates the link while a failed replacement preserves the existing path. Ordinary copies still follow file links and reject directories.Validation: the new real-filesystem regression fails on current master and passes with this change. It covers relative file/directory/dangling/self links, directory destinations, existing destination preservation, normal dereferencing, timestamps and the existing
rsync()caller, including repeated updates, same-path copying and failed replacements. GCC 13 build and strict ASan/UBSan/LeakSanitizer checks pass. Fullmake checkpasses 21 of 22 tests;pidfilecannot write/var/tmphere, with the identical failure reproduced on clean master.make distcheckdistributes and passes the new test, then hits the same restriction. Native Clang, Debian packaging, other operating systems and a cross-filesystemmovefile()were not tested locally. Recursiversync()'s existing directory-link traversal is unchanged.