aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_s3_bucket_list.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_s3_bucket_list.go')
-rw-r--r--weed/shell/command_s3_bucket_list.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/shell/command_s3_bucket_list.go b/weed/shell/command_s3_bucket_list.go
index 031b22d2d..bb55fc013 100644
--- a/weed/shell/command_s3_bucket_list.go
+++ b/weed/shell/command_s3_bucket_list.go
@@ -8,6 +8,7 @@ import (
"math"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
+ "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
)
func init() {
@@ -71,6 +72,12 @@ func (c *commandS3BucketList) Do(args []string, commandEnv *CommandEnv, writer i
if entry.Quota > 0 {
fmt.Fprintf(writer, "\tquota:%d\tusage:%.2f%%", entry.Quota, float64(collectionSize)*100/float64(entry.Quota))
}
+ // Show bucket owner (use %q to escape special characters)
+ if entry.Extended != nil {
+ if owner, ok := entry.Extended[s3_constants.AmzIdentityId]; ok && len(owner) > 0 {
+ fmt.Fprintf(writer, "\towner:%q", string(owner))
+ }
+ }
fmt.Fprintln(writer)
return nil
}, "", false, math.MaxUint32)