runtime: ignore ErrNotExist when remove rootfs
Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
e87c38ae05
commit
73b1449278
@ -121,7 +121,7 @@ func (b *Bundle) Delete() error {
|
||||
if err := mount.UnmountAll(rootfs, 0); err != nil {
|
||||
return errors.Wrapf(err, "unmount rootfs %s", rootfs)
|
||||
}
|
||||
if err := os.Remove(rootfs); err != nil && os.IsNotExist(err) {
|
||||
if err := os.Remove(rootfs); err != nil && !os.IsNotExist(err) {
|
||||
return errors.Wrap(err, "failed to remove bundle rootfs")
|
||||
}
|
||||
err := atomicDelete(b.Path)
|
||||
|
Loading…
Reference in New Issue
Block a user