Implement idempotent cleanup behavior
This commit is contained in:
@@ -13,6 +13,9 @@ import (
|
||||
func RemoveAllUnderRoot(rootPath, target string) error {
|
||||
root, targetName, err := openCleanupRoot(rootPath, target)
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
defer func() { _ = root.Close() }()
|
||||
|
||||
Reference in New Issue
Block a user