From 90ce4e52550e4eb9656cbc10cefef02cf12940c0 Mon Sep 17 00:00:00 2001 From: Ruairidh MacLeod Date: Wed, 4 Dec 2024 13:36:09 +0000 Subject: [PATCH] filter skipprefix directory from ListBucketsAndOwners --- backend/posix/posix.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/posix/posix.go b/backend/posix/posix.go index fcd8a0c2..bff80735 100644 --- a/backend/posix/posix.go +++ b/backend/posix/posix.go @@ -4067,6 +4067,11 @@ func (p *Posix) ListBucketsAndOwners(ctx context.Context) (buckets []s3response. continue } + if containsprefix(entry.Name(), p.skipprefix) { + // skip directories that match the skip prefix + continue + } + fi, err := entry.Info() if err != nil { continue