aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-05-23 10:36:22 -0700
committerChris Lu <chris.lu@gmail.com>2021-05-23 10:36:22 -0700
commitb70aeb758571f4dcb236abec92f410f18d1dc642 (patch)
tree97612134b2f6fcceb16a8ae5a25207fffd1e1f77
parent42fb03a66e2c140abb6e70ac6619b2863096fdd0 (diff)
downloadseaweedfs-b70aeb758571f4dcb236abec92f410f18d1dc642.tar.xz
seaweedfs-b70aeb758571f4dcb236abec92f410f18d1dc642.zip
bucket list only directories
-rw-r--r--weed/shell/command_s3_bucket_list.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/shell/command_s3_bucket_list.go b/weed/shell/command_s3_bucket_list.go
index 4acf9a866..0c4e8d18f 100644
--- a/weed/shell/command_s3_bucket_list.go
+++ b/weed/shell/command_s3_bucket_list.go
@@ -46,6 +46,9 @@ func (c *commandS3BucketList) Do(args []string, commandEnv *CommandEnv, writer i
}
err = filer_pb.List(commandEnv, filerBucketsPath, "", func(entry *filer_pb.Entry, isLast bool) error {
+ if !entry.IsDirectory {
+ return nil
+ }
if entry.Attributes.Replication == "" || entry.Attributes.Replication == "000" {
fmt.Fprintf(writer, " %s\n", entry.Name)
} else {