mirror of
https://github.com/minio/minio.git
synced 2025-07-13 19:11:06 -04:00
Prefix if empty skip it before IsValidBucket
This commit is contained in:
parent
93b47bc097
commit
82baccb8bf
@ -36,9 +36,11 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error) {
|
|||||||
// Bucket Operations
|
// Bucket Operations
|
||||||
|
|
||||||
func (storage *storage) ListBuckets(prefix string) ([]mstorage.BucketMetadata, error) {
|
func (storage *storage) ListBuckets(prefix string) ([]mstorage.BucketMetadata, error) {
|
||||||
|
if prefix != "" {
|
||||||
if mstorage.IsValidBucket(prefix) == false {
|
if mstorage.IsValidBucket(prefix) == false {
|
||||||
return []mstorage.BucketMetadata{}, mstorage.BucketNameInvalid{Bucket: prefix}
|
return []mstorage.BucketMetadata{}, mstorage.BucketNameInvalid{Bucket: prefix}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
files, err := ioutil.ReadDir(storage.root)
|
files, err := ioutil.ReadDir(storage.root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user