Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

receiver: re-apply directory timestamps after copying #139

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

jedevc
Copy link
Collaborator

@jedevc jedevc commented Nov 3, 2022

🛠️ Fixes the bug reported in moby/buildkit#2884 (comment).

This is needed as creating files in directories modifies their timestamp, so we need to set the timestamp again after creating all the directory contents.

This logic is similar to the logic in diffapply_unix.go in moby/buildkit.

Copy link
Owner

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a regression test for this?

Are you sure this is the same as issue in the buildkit report? That one seems to be using the copy package. nvm, just saw the other PR

@smira

This is needed as creating files in directories modifies their
timestamp, so we need to set the timestamp again after creating all the
directory contents.

This logic is similar to the logic in diffapply_unix.go in
moby/buildkit.

Signed-off-by: Justin Chadwell <[email protected]>
@jedevc jedevc force-pushed the receiver-directory-timestamps branch from c7a2672 to 408d4a2 Compare November 10, 2022 15:45
@jedevc
Copy link
Collaborator Author

jedevc commented Nov 10, 2022

Added a regression test.

@tonistiigi tonistiigi merged commit 2ac073b into tonistiigi:master Nov 10, 2022
@tonistiigi
Copy link
Owner

Added follow-up in #141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants