Merge pull request #16852 from estesp/overlay-cleanup

Simplify dir removal in overlay driver
This commit is contained in:
Alexander Morozov
2015-10-08 08:44:50 -07:00
+1 -5
View File
@@ -306,11 +306,7 @@ func (d *Driver) dir(id string) string {
// Remove cleans the directories that are created for this id.
func (d *Driver) Remove(id string) error {
dir := d.dir(id)
if _, err := os.Stat(dir); err != nil {
return err
}
return os.RemoveAll(dir)
return os.RemoveAll(d.dir(id))
}
// Get creates and mounts the required file system for the given id and returns the mount path.