SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
s3api: fix ListObjectVersions inconsistency with delimiters (#8210)
Chris Luc9c46db77e44
diff --git a/weed/s3api/s3api_object_versioning.go b/weed/s3api/s3api_object_versioning.goindex 1b8ae333fb..9147ebbdfc 100644--- a/weed/s3api/s3api_object_versioning.go+++ b/weed/s3api/s3api_object_versioning.go@@ -640,6 +640,24 @@ func (vc *versionCollector) collectVersions(currentPath, relativePath string) ercontinue}+ // Handle special directories that should bypass delimiter logic+ // This ensures .versions directories are processed as version containers+ // rather than being rolled up into CommonPrefixes when a delimiter is used+ if entry.IsDirectory {+ // Skip .uploads directory+ if strings.HasPrefix(entry.Name, s3_constants.MultipartUploadsFolder) {+ continue+ }++ // Handle .versions directory+ if strings.HasSuffix(entry.Name, s3_constants.VersionsFolder) {+ if err := vc.processVersionsDirectory(entryPath); err != nil {+ return err+ }+ continue+ }+ }+// Group into common prefixes if delimiter is found after the prefixif vc.delimiter != "" {fullKey := entryPath@@ -688,16 +706,6 @@ func (vc *versionCollector) collectVersions(currentPath, relativePath string) er// processDirectory handles directory entriesfunc (vc *versionCollector) processDirectory(currentPath, entryPath string, entry *filer_pb.Entry) error {- // Skip .uploads directory- if strings.HasPrefix(entry.Name, ".uploads") {- return nil- }-- // Handle .versions directory- if strings.HasSuffix(entry.Name, s3_constants.VersionsFolder) {- return vc.processVersionsDirectory(entryPath)- }-// Handle explicit S3 directory objectif entry.Attributes.Mime == s3_constants.FolderMimeType {vc.processExplicitDirectory(entryPath, entry)