mirror of
https://github.com/minio/minio.git
synced 2025-04-20 02:27:50 -04:00
Fix list entry deduplication (#12325)
File infos would always be the same. Add numversions as a final tiebreaker.
This commit is contained in:
parent
4f5d75f22b
commit
c2c803dd30
@ -189,11 +189,16 @@ func (z *erasureServerPools) listPath(ctx context.Context, o listPathOptions) (e
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
oFIV, err := existing.fileInfo(o.Bucket)
|
oFIV, err := other.fileInfo(o.Bucket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
// Replace if modtime is newer
|
||||||
|
if !oFIV.ModTime.Equal(eFIV.ModTime) {
|
||||||
return oFIV.ModTime.After(eFIV.ModTime)
|
return oFIV.ModTime.After(eFIV.ModTime)
|
||||||
|
}
|
||||||
|
// Use NumVersions as a final tiebreaker.
|
||||||
|
return oFIV.NumVersions > eFIV.NumVersions
|
||||||
})
|
})
|
||||||
if entries.len() > o.Limit {
|
if entries.len() > o.Limit {
|
||||||
allAtEOF = false
|
allAtEOF = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user