fix: make sure we list freeVersions like DEL marker with --versions (#19878)

freeVersions() was being incorrectly skipped; list it as
valid objects properly.

Co-authored-by: Krishnan Parthasarathi <Krishnan Parthasarathi>
This commit is contained in:
Harshavardhana
2024-06-07 15:18:44 -07:00
committed by GitHub
parent 2dd8faaedc
commit 29a25a538f
5 changed files with 63 additions and 12 deletions
+1 -1
View File
@@ -391,7 +391,7 @@ func (r *metacacheReader) filter(o listPathOptions) (entries metaCacheEntriesSor
if !o.InclDeleted && entry.isObject() && entry.isLatestDeletemarker() && !entry.isObjectDir() {
return true
}
if entry.isAllFreeVersions() {
if !o.InclDeleted && entry.isAllFreeVersions() {
return true
}
entries.o = append(entries.o, entry)