diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-27 10:43:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-27 10:43:36 -0400 |
commit | f48bf5808b2d8da423a6d6e53f8e6699ef233d7c (patch) | |
tree | 1c39f1664744a01c0d6359e49495c7a11f8ec57d /libpod/container_copy_linux.go | |
parent | a72b2402c9569028abbff2364f4f40f4728e5688 (diff) | |
parent | 8efdbf5c4c95ece4237aa8ca75f8b0876e65113f (diff) | |
download | podman-f48bf5808b2d8da423a6d6e53f8e6699ef233d7c.tar.gz podman-f48bf5808b2d8da423a6d6e53f8e6699ef233d7c.tar.bz2 podman-f48bf5808b2d8da423a6d6e53f8e6699ef233d7c.zip |
Merge pull request #14393 from jwhonce/wip/archive_todo
Add API support for NoOverwriteDirNonDir
Diffstat (limited to 'libpod/container_copy_linux.go')
-rw-r--r-- | libpod/container_copy_linux.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libpod/container_copy_linux.go b/libpod/container_copy_linux.go index 7566fbb12..9528cd06b 100644 --- a/libpod/container_copy_linux.go +++ b/libpod/container_copy_linux.go @@ -23,7 +23,7 @@ import ( "golang.org/x/sys/unix" ) -func (c *Container) copyFromArchive(path string, chown bool, rename map[string]string, reader io.Reader) (func() error, error) { +func (c *Container) copyFromArchive(path string, chown, noOverwriteDirNonDir bool, rename map[string]string, reader io.Reader) (func() error, error) { var ( mountPoint string resolvedRoot string @@ -89,11 +89,12 @@ func (c *Container) copyFromArchive(path string, chown bool, rename map[string]s defer unmount() defer decompressed.Close() putOptions := buildahCopiah.PutOptions{ - UIDMap: c.config.IDMappings.UIDMap, - GIDMap: c.config.IDMappings.GIDMap, - ChownDirs: idPair, - ChownFiles: idPair, - Rename: rename, + UIDMap: c.config.IDMappings.UIDMap, + GIDMap: c.config.IDMappings.GIDMap, + ChownDirs: idPair, + ChownFiles: idPair, + NoOverwriteDirNonDir: noOverwriteDirNonDir, + Rename: rename, } return c.joinMountAndExec( |