mirror of
https://github.com/minio/minio.git
synced 2026-11-18 06:58:15 +00:00
pkg/fs: test, bench, and drop unnecessary check in ListBuckets
There is now a simple test and a benchmark for ListBuckets. I also dropped an unnecessary check that was simply repeated from above, guaranteed to be true.
This commit is contained in:
1 parent
114f9de5eb
commit
a5d0bef4e2
2 files changed
+75
-1
No files matched your search
+1
-1
@@ -78,7 +78,7 @@ func (fs Filesystem) ListBuckets() ([]BucketMetadata, *probe.Error) {
|
||||
}
|
||||
// If directories are found with odd names, skip them.
|
||||
dirName := strings.ToLower(file.Name())
|
||||
if file.IsDir() && !IsValidBucketName(dirName) {
|
||||
if !IsValidBucketName(dirName) {
|
||||
continue
|
||||
}
|
||||
metadata := BucketMetadata{
|
||||
|
||||
Reference in new issue
Block a user