mirror of
https://github.com/minio/minio.git
synced 2024-12-23 21:55:53 -05:00
fix: decodeDirObject in prefix usage function (#13026)
prefixes at top level create such as ``` ~ mc mb alias/bucket/prefix ``` The prefix/ incorrect appears as prefix__XL_DIR__/ in the accountInfo output, make sure to trim '__XL_DIR__'
This commit is contained in:
parent
0f01e7ef0f
commit
14fe8ecb58
@ -84,7 +84,8 @@ func loadPrefixUsageFromBackend(ctx context.Context, objAPI ObjectLayer, bucket
|
||||
}
|
||||
|
||||
for id, usageInfo := range cache.flattenChildrens(*root) {
|
||||
prefix := strings.TrimPrefix(id, bucket+slashSeparator)
|
||||
prefix := decodeDirObject(strings.TrimPrefix(id, bucket+slashSeparator))
|
||||
// decodeDirObject to avoid any __XL_DIR__ objects
|
||||
m[prefix] += uint64(usageInfo.Size)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user