aboutsummaryrefslogtreecommitdiff
path: root/pkg/copy/parse.go
diff options
context:
space:
mode:
authorMehul Arora <aroram18@mcmaster.ca>2021-06-19 11:27:24 +0530
committerValentin Rothberg <rothberg@redhat.com>2021-07-27 15:32:23 +0200
commit6fe03b25abded53b67a7707abbcd9708042d9151 (patch)
tree91d3f08eee6a7389873d8f22db9dee1393c05a18 /pkg/copy/parse.go
parentb6c279be2296ce32fbb36ba39bd948f93be9bede (diff)
downloadpodman-6fe03b25abded53b67a7707abbcd9708042d9151.tar.gz
podman-6fe03b25abded53b67a7707abbcd9708042d9151.tar.bz2
podman-6fe03b25abded53b67a7707abbcd9708042d9151.zip
support container to container copy
Implement container to container copy. Previously data could only be copied from/to the host. Fixes: #7370 Co-authored-by: Mehul Arora <aroram18@mcmaster.ca> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/copy/parse.go')
-rw-r--r--pkg/copy/parse.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/pkg/copy/parse.go b/pkg/copy/parse.go
index 39e0e1547..93edec5fa 100644
--- a/pkg/copy/parse.go
+++ b/pkg/copy/parse.go
@@ -18,18 +18,6 @@ func ParseSourceAndDestination(source, destination string) (string, string, stri
sourceContainer, sourcePath := parseUserInput(source)
destContainer, destPath := parseUserInput(destination)
- numContainers := 0
- if len(sourceContainer) > 0 {
- numContainers++
- }
- if len(destContainer) > 0 {
- numContainers++
- }
-
- if numContainers != 1 {
- return "", "", "", "", errors.Errorf("invalid arguments %q, %q: exactly 1 container expected but %d specified", source, destination, numContainers)
- }
-
if len(sourcePath) == 0 || len(destPath) == 0 {
return "", "", "", "", errors.Errorf("invalid arguments %q, %q: you must specify paths", source, destination)
}