mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Fix bind-mounts only partially removed
When calling delete on a bind-mount volume, the config file was bing removed, but it was not actually being removed from the volume index. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
committed by
Arnaud Porterie
parent
6646cff646
commit
ddc2e25546
@@ -169,13 +169,11 @@ func (r *Repository) Delete(path string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if volume.IsBindMount {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err := r.driver.Remove(volume.ID); err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
if !volume.IsBindMount {
|
||||
if err := r.driver.Remove(volume.ID); err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user