mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-26 10:17:53 +00:00
use AttachSocketPath when removing conmon files
Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
parent
35b62ef19f
commit
6708bc235f
1 changed files with 5 additions and 1 deletions
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue