diff --git a/ls-main.go b/ls-main.go index c497efee..6b4016c2 100644 --- a/ls-main.go +++ b/ls-main.go @@ -96,6 +96,11 @@ func checkListSyntax(ctx *cli.Context) { for _, url := range URLs { _, _, err := url2Stat(url) if err != nil && !isURLPrefixExists(url, isIncomplete) { + // Bucket name empty is a valid error for 'ls myminio', + // treat it as such. + if _, ok := err.ToGoError().(BucketNameEmpty); ok { + continue + } fatalIf(err.Trace(url), "Unable to stat ‘"+url+"’.") } }