summaryrefslogtreecommitdiff
path: root/libpod/container_copy_linux.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2022-05-26 16:24:10 -0700
committerJhon Honce <jhonce@redhat.com>2022-05-26 16:31:15 -0700
commit8efdbf5c4c95ece4237aa8ca75f8b0876e65113f (patch)
tree70bc32e3127943269aade4f683dd75f94b65224c /libpod/container_copy_linux.go
parent1736f2fe607a82d066497aba330d6a81a07f5164 (diff)
downloadpodman-8efdbf5c4c95ece4237aa8ca75f8b0876e65113f.tar.gz
podman-8efdbf5c4c95ece4237aa8ca75f8b0876e65113f.tar.bz2
podman-8efdbf5c4c95ece4237aa8ca75f8b0876e65113f.zip
Add API support for NoOverwriteDirNonDir
Update method signatures and structs to pass option to buildah code ```release-note NONE ``` [NO NEW TESTS NEEDED] Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'libpod/container_copy_linux.go')
-rw-r--r--libpod/container_copy_linux.go13
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(