mirror of
https://github.com/minio/minio.git
synced 2025-01-26 22:23:15 -05:00
fix: ListObjectVersions returning duplicates when resuming with null version id (#19518)
When resuming a versioned listing where `version-id-marker=null`, the `null` object would always be returned, causing duplicate entries to be returned. Add check against empty version
This commit is contained in:
parent
0cf3d93360
commit
9246990496
@ -152,6 +152,15 @@ func (f *FileInfoVersions) findVersionIndex(v string) int {
|
||||
if f == nil || v == "" {
|
||||
return -1
|
||||
}
|
||||
if v == nullVersionID {
|
||||
for i, ver := range f.Versions {
|
||||
if ver.VersionID == "" {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
for i, ver := range f.Versions {
|
||||
if ver.VersionID == v {
|
||||
return i
|
||||
|
Loading…
x
Reference in New Issue
Block a user