Skip to content

Commit

Permalink
fix quota info (#5040)
Browse files Browse the repository at this point in the history
  • Loading branch information
poornas authored Sep 20, 2024
1 parent 11ebe95 commit 3dac3d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/quota-info.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,14 @@ func mainQuotaInfo(ctx *cli.Context) error {
_, targetURL := url2Alias(args[0])
qCfg, e := client.GetBucketQuota(globalContext, targetURL)
fatalIf(probe.NewError(e).Trace(args...), "Unable to get bucket quota")
sz := qCfg.Quota
if qCfg.Size > 0 {
sz = qCfg.Size
}
printMsg(quotaMessage{
op: ctx.Command.Name,
Bucket: targetURL,
Quota: qCfg.Quota,
Quota: sz,
QuotaType: string(qCfg.Type),
Status: "success",
})
Expand Down

0 comments on commit 3dac3d3

Please sign in to comment.