diff options
author | Valentin Rothberg <vrothberg@redhat.com> | 2022-06-01 15:20:46 +0200 |
---|---|---|
committer | Valentin Rothberg <vrothberg@redhat.com> | 2022-06-10 09:42:19 +0200 |
commit | d4272bed51e2060d431ad042e803770e4d2fe64e (patch) | |
tree | 057d0f294bf22414526a033b48af2fa41edb93a2 /libpod/container_copy_linux.go | |
parent | 46c8da7d9acd6011f318ce8fa9c38591888654f0 (diff) | |
download | podman-d4272bed51e2060d431ad042e803770e4d2fe64e.tar.gz podman-d4272bed51e2060d431ad042e803770e4d2fe64e.tar.bz2 podman-d4272bed51e2060d431ad042e803770e4d2fe64e.zip |
podman cp: do not overwrite non-dirs with dirs and vice versa
Add a new `--overwrite` flag to `podman cp` to allow for overwriting in
case existing users depend on the behavior; they will have a workaround.
By default, the flag is turned off to be compatible with Docker and to
have a more sane behavior.
Fixes: #14420
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'libpod/container_copy_linux.go')
-rw-r--r-- | libpod/container_copy_linux.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libpod/container_copy_linux.go b/libpod/container_copy_linux.go index 9528cd06b..6835b2f1f 100644 --- a/libpod/container_copy_linux.go +++ b/libpod/container_copy_linux.go @@ -94,6 +94,7 @@ func (c *Container) copyFromArchive(path string, chown, noOverwriteDirNonDir boo ChownDirs: idPair, ChownFiles: idPair, NoOverwriteDirNonDir: noOverwriteDirNonDir, + NoOverwriteNonDirDir: noOverwriteDirNonDir, Rename: rename, } |