-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman cp: unexpected mkdir on symlink expansion #3894
Comments
While this definitely sounds like a bug - can you confirm that Docker doesn't do this? It seems like a sufficiently obscure case that I'm honestly not sure what the right thing to do it... |
I confirmed it yesterday with docker-1.13.1-103.git7f2769b.el7: fails with 'no such directory' |
Alright, that's our intended behavior, then |
@QiWang19 as a note, the test that @edsantiago recently put in will most likely fail after you correct this and you will need to adjust it to mirror the correct behavior. |
close containers#3894 This patch let podman cp return 'no such file or directory' error if DEST_PATH does not exist and ends with / when copying file. Signed-off-by: Qi Wang <[email protected]>
Changes as of 2022-04-21: - apply-podman-deltas: minor cleanup - buildah-tests.diff: deal with: . buildah containers#3894 (the registry one), which affected helpers.bash in a way that resulted in conflicts here; and . buildah containers#3917 (etchosts), which caused offset-only diffs with no conflicts - Reevaluate the bud skip list, and reenable some tests that seems to be passing now under podman: . bud with specified context ... . two tests that require a local registry (which buildah now runs) . bud with --cgroup-parent Signed-off-by: Ed Santiago <[email protected]> Signed-off-by: Daniel J Walsh <[email protected]>
podman cp
into a container, when the destination argument is a symlink pointing to a nonexistent path, and includes a trailing slash, will (surprisingly) mkdir that path:When copying to
/tmp/d1/x
, where x points to nonexistent/tmp/nonesuch1
, podman created the file/tmp/nonesuch1
. This is weird: I would've expected an error (dangling symlink). But this is the same behavior as docker-1.13.1-103.git7f2769b.el7, so maybe we have to live with it.When copying to
/tmp/d2/x/
, same as above but with a trailing slash, podman actuallymkdir()s
the dangling nonexistent directory, then places the file in that directory with the same name as the source file. This, I think, is bizarre and entirely wrong. (docker fails with 'no such directory').podman master @ f221c61
The text was updated successfully, but these errors were encountered: