Skip to content

Commit

Permalink
Fix bind-mounts only partially removed
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cpuguy83 committed Jan 26, 2015
1 parent 94e169b commit b428320
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions volumes/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand Down

0 comments on commit b428320

Please sign in to comment.