Преглед изворни кода

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>
Brian Goff пре 10 година
родитељ
комит
b4283209d5
1 измењених фајлова са 5 додато и 7 уклоњено
  1. 5 7
      volumes/repository.go

+ 5 - 7
volumes/repository.go

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