diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-07 16:10:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-07 16:10:05 +0100 |
commit | f85b3a01f050e4f8af8471f396013f18647d9241 (patch) | |
tree | c84efb35627130073164c770a13d0708b813bde9 /cmd/podman | |
parent | e3622209716ad1494531cd3cd38114081ec90f87 (diff) | |
parent | b6e1689ff23777b91fdfe72823a9a4e10360c6c0 (diff) | |
download | podman-f85b3a01f050e4f8af8471f396013f18647d9241.tar.gz podman-f85b3a01f050e4f8af8471f396013f18647d9241.tar.bz2 podman-f85b3a01f050e4f8af8471f396013f18647d9241.zip |
Merge pull request #4774 from QiWang19/cp_src_path
fix bug copy from container directory
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/cp.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/cp.go b/cmd/podman/cp.go index 762d70252..1e4491f33 100644 --- a/cmd/podman/cp.go +++ b/cmd/podman/cp.go @@ -222,7 +222,7 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin srcPath = os.Stdin.Name() extract = true } - return copy(srcPath, destPath, dest, idMappingOpts, &destOwner, extract, isFromHostToCtr) + return copy(srcPath, destPath, src, dest, idMappingOpts, &destOwner, extract, isFromHostToCtr) } func getUser(mountPoint string, userspec string) (specs.User, error) { @@ -276,8 +276,8 @@ func getPathInfo(path string) (string, os.FileInfo, error) { return path, srcfi, nil } -func copy(src, destPath, dest string, idMappingOpts storage.IDMappingOptions, chownOpts *idtools.IDPair, extract, isFromHostToCtr bool) error { - srcPath, err := evalSymlinks(src) +func copy(srcPath, destPath, src, dest string, idMappingOpts storage.IDMappingOptions, chownOpts *idtools.IDPair, extract, isFromHostToCtr bool) error { + srcPath, err := evalSymlinks(srcPath) if err != nil { return errors.Wrapf(err, "error evaluating symlinks %q", srcPath) } |