Merge pull request #16852 from estesp/overlay-cleanup
Simplify dir removal in overlay driver Upstream-commit: 6654b0e05f663da394bac6ed846187bca90451f5 Component: engine
This commit is contained in:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user