From df81fca3fc33231312c4abc322f7b6912a98b247 Mon Sep 17 00:00:00 2001 From: Christian Richter Date: Thu, 27 Jun 2024 13:53:23 +0200 Subject: [PATCH] add explanation Signed-off-by: Christian Richter --- ocis/pkg/trash/trash.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ocis/pkg/trash/trash.go b/ocis/pkg/trash/trash.go index 4ff4161dd10..ded61760446 100644 --- a/ocis/pkg/trash/trash.go +++ b/ocis/pkg/trash/trash.go @@ -44,6 +44,9 @@ func removeEmptyFolder(path string, dryRun bool) error { return nil } if err := os.Remove(path); err != nil { + // we do not really care about the error here + // if the folder is not empty we will get an error, + // this is our signal to break out of the recursion return nil } nd := filepath.Dir(path)