fix: make trash cleanup best effort
This commit is contained in:
@@ -142,7 +142,10 @@ func (s Local) MoveToTrash(path, trashRoot string) error {
|
||||
if e = movePath(p, target); e != nil {
|
||||
return e
|
||||
}
|
||||
return cleanupTrash(trashRoot, 30*24*time.Hour)
|
||||
// Cleanup is maintenance work; a successful move must not be reported as
|
||||
// a failed delete merely because an unrelated stale trash entry is busy.
|
||||
_ = cleanupTrash(trashRoot, 30*24*time.Hour)
|
||||
return nil
|
||||
}
|
||||
|
||||
func cleanupTrash(root string, maxAge time.Duration) error {
|
||||
|
||||
Reference in New Issue
Block a user