mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +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
@@ -114,6 +114,14 @@ func (xl xlObjects) ListObjects(bucket, prefix, marker, delimiter string, maxKey
|
||||
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