S3 driver's Walk finds no repositories on SeaweedFS: StartAfter set to the root directory prefix

Author: gh-abhayCreated Aug 10, 2026Updated Aug 10, 2026

With rootdirectory set and an S3 backend that enforces StartAfter strictly (SeaweedFS), the S3 driver's Walk finds no repositories. Garbage collection and /v2/_catalog come up empty even though every repository is present and served correctly.

doWalk always sets StartAfter: d.s3Path(startAfter). Repository enumeration walks with an empty hint, and d.s3Path("") returns the bare root directory (e.g. zot) — a lexical ancestor of every key under the prefix. AWS S3 ignores such a marker and returns the keys anyway; SeaweedFS returns an empty listing. List() is unaffected because it never sets StartAfter.

Reproduction against a SeaweedFS bucket with keys under rootdir/:

--prefix rootdir/                        → keys
--prefix rootdir/ --start-after rootdir  → empty   # the call doWalk makes
--prefix rootdir/ --start-after rootdir/ → keys

Fix: only set StartAfter when a hint is actually given. PR incoming.

Source: distribution/distribution