From 725c3a08b15018384c956f516ac4a7a72a53cd1e Mon Sep 17 00:00:00 2001 From: OpenClaw Agent Date: Mon, 21 Sep 2026 19:56:41 +0800 Subject: [PATCH] fix: make trash cleanup best effort --- chfs-ng/internal/storage/storage.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chfs-ng/internal/storage/storage.go b/chfs-ng/internal/storage/storage.go index e78bb05..1ab6608 100644 --- a/chfs-ng/internal/storage/storage.go +++ b/chfs-ng/internal/storage/storage.go @@ -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 {