mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
use AttachSocketPath when removing conmon files
Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user