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>
Upstream-commit: b4283209d55289abb2c5b63df949a27c2704f5af
Component: engine
This commit is contained in:
Brian Goff
2015-01-23 14:14:52 -05:00
parent d3ac88b1d5
commit cc5294bd01

View File

@ -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
}
}
}