Fix build

This commit is contained in:
Frederick F. Kautz IV 2015-01-28 14:00:08 -08:00
parent cc54730eee
commit ca7b1a7fc6
1 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,6 @@
package fs package fs
import ( import (
"errors"
"io" "io"
"io/ioutil" "io/ioutil"
"os" "os"
@ -37,8 +36,8 @@ 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 mstorage.IsValidBucket(bucket) == false { if mstorage.IsValidBucket(prefix) == false {
return []mstorage.BucketMetadata{}, mstorage.BucketNameInvalid{Bucket: bucket} return []mstorage.BucketMetadata{}, mstorage.BucketNameInvalid{Bucket: prefix}
} }
files, err := ioutil.ReadDir(storage.root) files, err := ioutil.ReadDir(storage.root)
@ -56,7 +55,7 @@ func (storage *storage) ListBuckets(prefix string) ([]mstorage.BucketMetadata, e
Name: file.Name(), Name: file.Name(),
Created: file.ModTime(), // TODO - provide real created time Created: file.ModTime(), // TODO - provide real created time
} }
metadataList = append(metadata, metadataList) metadataList = append(metadataList, metadata)
} }
} }
return metadataList, nil return metadataList, nil