mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
bucket list only directories
This commit is contained in:
parent
42fb03a66e
commit
b70aeb7585
|
@ -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 {
|
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" {
|
if entry.Attributes.Replication == "" || entry.Attributes.Replication == "000" {
|
||||||
fmt.Fprintf(writer, " %s\n", entry.Name)
|
fmt.Fprintf(writer, " %s\n", entry.Name)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue