summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index a53027ab2..80c00a622 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -685,7 +685,11 @@ func (c *Container) removeIPv4Allocations() error {
// This is necessary for restarting containers
func (c *Container) removeConmonFiles() error {
// Files are allowed to not exist, so ignore ENOENT
- attachFile := filepath.Join(c.bundlePath(), "attach")
+ attachFile, err := c.AttachSocketPath()
+ if err != nil {
+ return errors.Wrapf(err, "failed to get attach socket path for container %s", c.ID())
+ }
+
if err := os.Remove(attachFile); err != nil && !os.IsNotExist(err) {
return errors.Wrapf(err, "error removing container %s attach file", c.ID())
}
@@ -1309,7 +1313,7 @@ func (c *Container) stop(timeout uint) error {
}
// We have to check stopErr *after* we lock again - otherwise, we have a
- // change of panicing on a double-unlock. Ref: GH Issue 9615
+ // change of panicking on a double-unlock. Ref: GH Issue 9615
if stopErr != nil {
return stopErr
}
@@ -1672,7 +1676,7 @@ func (c *Container) chownVolume(volumeName string) error {
// TODO: For now, I've disabled chowning volumes owned by non-Podman
// drivers. This may be safe, but it's really going to be a case-by-case
- // thing, I think - safest to leave disabled now and reenable later if
+ // thing, I think - safest to leave disabled now and re-enable later if
// there is a demand.
if vol.state.NeedsChown && !vol.UsesVolumeDriver() {
vol.state.NeedsChown = false