metabase: Check parameter for CountAliveObjectsInBucket
#1414
1 changed files with 3 additions and 2 deletions
|
@ -452,10 +452,11 @@ func (db *DB) CountAliveObjectsInBucket(ctx context.Context, prm CountAliveObjec
|
|||
return 0, ErrDegradedMode
|
||||
}
|
||||
|
||||
cidRaw := prm.BucketName[1:bucketKeySize]
|
||||
if cidRaw == nil {
|
||||
if len(prm.BucketName) != bucketKeySize {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
cidRaw := prm.BucketName[1:bucketKeySize]
|
||||
var count uint64
|
||||
err := db.boltDB.View(func(tx *bbolt.Tx) error {
|
||||
bkt := tx.Bucket(prm.BucketName)
|
||||
|
|
Loading…
Reference in a new issue