mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
XL: ListObjects should not list when delimiter and prefix are '/'. (#1777)
This commit is contained in:
committed by
Harshavardhana
parent
27cc8a6529
commit
ba8bdec077
@@ -338,6 +338,15 @@ func (fs fsObjects) listObjectsFS(bucket, prefix, marker, delimiter string, maxK
|
||||
return ListObjectsInfo{}, nil
|
||||
}
|
||||
|
||||
// For delimiter and prefix as '/' we do not list anything at all
|
||||
// since according to s3 spec we stop at the 'delimiter'
|
||||
// along // with the prefix. On a flat namespace with 'prefix'
|
||||
// as '/' we don't have any entries, since all the keys are
|
||||
// of form 'keyName/...'
|
||||
if delimiter == slashSeparator && prefix == slashSeparator {
|
||||
return ListObjectsInfo{}, nil
|
||||
}
|
||||
|
||||
// Over flowing count - reset to maxObjectList.
|
||||
if maxKeys < 0 || maxKeys > maxObjectList {
|
||||
maxKeys = maxObjectList
|
||||
|
||||
Reference in New Issue
Block a user