Simplify root-scoped cleanup

This commit is contained in:
2026-09-02 00:48:40 +00:00
parent 39b2665d8b
commit 1e418d6929
8 changed files with 42 additions and 145 deletions

View File

@@ -66,7 +66,7 @@ func promoteDirectoryConfined(src, dst string, parent *os.Root, destinationName
closeErr = temporary.Close()
}
if removeTemporary {
removeErr := removeConfinedEntry(parent, temporaryName)
removeErr := parent.RemoveAll(temporaryName)
if removeErr != nil {
resultErr = errors.Join(resultErr, fmt.Errorf("remove temporary destination directory: %w", removeErr))
}