Restore directory timestamps after receiving their children - #88
Open
OskarEichler wants to merge 1 commit into
Open
Restore directory timestamps after receiving their children#88OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
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.
Summary
Save each received directory's timestamps on its stack frame and apply them when its
Edirective arrives, after its children have been created.Reproduction and evidence
A local state-machine reproduction receives
T1000000000 123456 1000000010 234567,D0755 0 tree, a child file andE. Before this patch, creating the child replaces the directory's saved mtime; afterward the original seconds and microseconds are retained. Nested-directory integration through a local OpenSSH scp process also passes. That local sender emits whole-second timestamps, so the native check compares its transmitted precision.Compatibility / breaking changes
No API or dependency change. With preserve enabled, directory timestamps are applied after directory contents complete, rather than before them. Incomplete directory transfers do not receive final preserved timestamps. File timestamp behavior is unchanged.
Verification and limits