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

Allow restoring directories #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nelsonjr
Copy link

If the target is a folder and it already exists, a cp will not copy the folder correctly.

For example, let's say the cache is /var/cache/buildkite/978d7c5ebf8d670814180efd0e18ca4745059acd and we want to restore /go.

If the /go already exists, cp -a "$from" "$to" will create the folder 978d7c5ebf8d670814180efd0e18ca4745059acd under the /go folder instead of copying it as it.

This PR fixes this issue.

@nelsonjr nelsonjr requested a review from a team as a code owner December 28, 2024 09:04
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.

1 participant