-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix bug podman cp directory #2845
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
Conversation
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon, QiWang19 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
cmd/podman/cp.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you set this to err == nil?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I should...
cmd/podman/cp.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though this save lines in code, but make less readable.
|
LGTM |
|
☔ The latest upstream changes (presumably #2706) made this pull request unmergeable. Please resolve the merge conflicts. |
`podman cp` used to copy the contents under the source directory to the destination. But according to the specification in podman-cp.md. it should copy the whole directory to the destination if the destination directory already exists. - src dir ends with /., copy the contents to dest dir - src dir does not end with /. - dest dir /home does not exist, copy the contents - dest dir /home exists, copy the directory ``` $ sudo podman cp /home/qiwan/Documents/empty 7c47:/home $ sudo podman exec -it 7c47 ls /home $ $ sudo podman cp /home/qiwan/Documents/empty 7c47:/home $ sudo podman exec -it 7c47 ls /home empty ``` Signed-off-by: Qi Wang <qiwan@redhat.com>
|
/lgtm |
close #2836
podman cpused to copy the contents under the source directory to the destination. But according to the specification in podman-cp.md. it should copy the whole directory to the destination if the destination directory already exists./homedoes not exist, copy the contents/homeexists, copy the directorySigned-off-by: Qi Wang qiwan@redhat.com