diff options
author | Jhon Honce <jhonce@redhat.com> | 2022-05-26 16:24:10 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2022-05-26 16:31:15 -0700 |
commit | 8efdbf5c4c95ece4237aa8ca75f8b0876e65113f (patch) | |
tree | 70bc32e3127943269aade4f683dd75f94b65224c /libpod/container_api.go | |
parent | 1736f2fe607a82d066497aba330d6a81a07f5164 (diff) | |
download | podman-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_api.go')
-rw-r--r-- | libpod/container_api.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 0fab36bdc..d87deb71a 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -446,7 +446,7 @@ func (c *Container) AddArtifact(name string, data []byte) error { return define.ErrCtrRemoved } - return ioutil.WriteFile(c.getArtifactPath(name), data, 0740) + return ioutil.WriteFile(c.getArtifactPath(name), data, 0o740) } // GetArtifact reads the specified artifact file from the container @@ -877,7 +877,7 @@ func (c *Container) ShouldRestart(ctx context.Context) bool { // CopyFromArchive copies the contents from the specified tarStream to path // *inside* the container. -func (c *Container) CopyFromArchive(ctx context.Context, containerPath string, chown bool, rename map[string]string, tarStream io.Reader) (func() error, error) { +func (c *Container) CopyFromArchive(_ context.Context, containerPath string, chown, noOverwriteDirNonDir bool, rename map[string]string, tarStream io.Reader) (func() error, error) { if !c.batched { c.lock.Lock() defer c.lock.Unlock() @@ -887,7 +887,7 @@ func (c *Container) CopyFromArchive(ctx context.Context, containerPath string, c } } - return c.copyFromArchive(containerPath, chown, rename, tarStream) + return c.copyFromArchive(containerPath, chown, noOverwriteDirNonDir, rename, tarStream) } // CopyToArchive copies the contents from the specified path *inside* the |