From d4272bed51e2060d431ad042e803770e4d2fe64e Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 1 Jun 2022 15:20:46 +0200 Subject: 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 --- pkg/domain/entities/containers.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/domain/entities') diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index 37711ca58..750f49590 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -443,6 +443,9 @@ type ContainerCpOptions struct { Pause bool // Extract the tarfile into the destination directory. Extract bool + // OverwriteDirNonDir allows for overwriting a directory with a + // non-directory and vice versa. + OverwriteDirNonDir bool } // ContainerStatsOptions describes input options for getting -- cgit v1.2.3-54-g00ecf