summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/containers/cp.go2
-rw-r--r--test/system/065-cp.bats8
2 files changed, 4 insertions, 6 deletions
diff --git a/cmd/podman/containers/cp.go b/cmd/podman/containers/cp.go
index b29a95707..7887e9539 100644
--- a/cmd/podman/containers/cp.go
+++ b/cmd/podman/containers/cp.go
@@ -231,8 +231,6 @@ func copyToContainer(container string, containerPath string, hostPath string) er
if hostPath == "-" {
hostPath = os.Stdin.Name()
isStdin = true
- } else if hostPath == os.Stdin.Name() {
- isStdin = true
}
// Make sure that host path exists.
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index 87a961160..312106b36 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -475,9 +475,9 @@ load helpers
run_podman exec cpcontainer rm -rf /tmp/$srcdir
# Now for "/dev/stdin".
+ # Note: while this works, the content ends up in Nirvana.
+ # Same for Docker.
run_podman cp /dev/stdin cpcontainer:/tmp < $tar_file
- run_podman exec cpcontainer cat /tmp/$srcdir/$rand_filename
- is "$output" "$rand_content"
# Error checks below ...
@@ -487,11 +487,11 @@ load helpers
# Destination must be a directory (on an existing file).
run_podman exec cpcontainer touch /tmp/file.txt
- run_podman 125 cp /dev/stdin cpcontainer:/tmp/file.txt < $tar_file
+ run_podman 125 cp - cpcontainer:/tmp/file.txt < $tar_file
is "$output" 'Error: destination must be a directory when copying from stdin'
# Destination must be a directory (on an absent path).
- run_podman 125 cp /dev/stdin cpcontainer:/tmp/IdoNotExist < $tar_file
+ run_podman 125 cp - cpcontainer:/tmp/IdoNotExist < $tar_file
is "$output" 'Error: destination must be a directory when copying from stdin'
run_podman rm -f cpcontainer