Merge pull request #94 from harshavardhana/pr_out_prefix_if_empty_skip_it_before_isvalidbucket

master
Harshavardhana 10 years ago
commit 966707a7ed
  1. 2
      pkg/storage/fs/fs.go

@ -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…
Cancel
Save