mirror of
https://github.com/pgsty/minio.git
synced 2026-03-16 17:53:43 +01:00
fix: multi-way list entry resolution (#12617)
Fixes brought forward from https://github.com/minio/minio/pull/12605 Fixes resolution when an object is in prefix of another and one zone returns the directory and another the object. Fixes resolution on single entries that arrive first, so resolution doesn't depend on order.
This commit is contained in:
@@ -182,7 +182,11 @@ func (z *erasureServerPools) listPath(ctx context.Context, o listPathOptions) (e
|
||||
|
||||
// Resolve non-trivial conflicts
|
||||
entries.deduplicate(func(existing, other *metaCacheEntry) (replace bool) {
|
||||
if existing.isDir() {
|
||||
// Pick object over directory
|
||||
if existing.isDir() && !other.isDir() {
|
||||
return true
|
||||
}
|
||||
if !existing.isDir() && other.isDir() {
|
||||
return false
|
||||
}
|
||||
eFIV, err := existing.fileInfo(o.Bucket)
|
||||
|
||||
Reference in New Issue
Block a user