summaryrefslogtreecommitdiff
path: root/libpod/container_copy_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-29 11:31:39 -0400
committerGitHub <noreply@github.com>2022-04-29 11:31:39 -0400
commit95ff349de22e01eaa76cfc19891cc37952789b82 (patch)
treeddfaeb501528c01a93624e357774116f4819f210 /libpod/container_copy_linux.go
parent73836e0c6a22d919dd8be297bafd137f1bd8ec9e (diff)
parente6557bf0a291f4462081e50461b1b9b8715d1da3 (diff)
downloadpodman-95ff349de22e01eaa76cfc19891cc37952789b82.tar.gz
podman-95ff349de22e01eaa76cfc19891cc37952789b82.tar.bz2
podman-95ff349de22e01eaa76cfc19891cc37952789b82.zip
Merge pull request #14031 from Luap99/errcheck
enable errcheck linter
Diffstat (limited to 'libpod/container_copy_linux.go')
-rw-r--r--libpod/container_copy_linux.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/libpod/container_copy_linux.go b/libpod/container_copy_linux.go
index 91e712c74..7566fbb12 100644
--- a/libpod/container_copy_linux.go
+++ b/libpod/container_copy_linux.go
@@ -48,7 +48,11 @@ func (c *Container) copyFromArchive(path string, chown bool, rename map[string]s
if err != nil {
return nil, err
}
- unmount = func() { c.unmount(false) }
+ unmount = func() {
+ if err := c.unmount(false); err != nil {
+ logrus.Errorf("Failed to unmount container: %v", err)
+ }
+ }
}
if c.state.State == define.ContainerStateRunning {
@@ -117,7 +121,11 @@ func (c *Container) copyToArchive(path string, writer io.Writer) (func() error,
if err != nil {
return nil, err
}
- unmount = func() { c.unmount(false) }
+ unmount = func() {
+ if err := c.unmount(false); err != nil {
+ logrus.Errorf("Failed to unmount container: %v", err)
+ }
+ }
}
statInfo, resolvedRoot, resolvedPath, err := c.stat(mountPoint, path)