Skip to content

Commit 07e5a3b

Browse files
committed
Merge branch 'staging' into sprint-1.19
# Conflicts: # go.mod # go.sum
2 parents 46095e0 + c42f0f8 commit 07e5a3b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

code/go/0chain.net/blobbercore/handler/storage_handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ func (fsh *StorageHandler) ListEntities(ctx context.Context, r *http.Request) (*
485485
dirref = r
486486
if path == "/" {
487487
dirref.Size = allocationObj.BlobberSizeUsed
488+
dirref.NumFiles = int64(allocationObj.NumObjects)
488489
}
489490
}
490491

code/go/0chain.net/blobbercore/reference/ref.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func init() {
4242
field := refType.Field(i)
4343
dirListTag := field.Tag.Get(DIR_LIST_TAG)
4444

45-
if dirListTag != "" && dirListTag != "is_empty" {
45+
if dirListTag != "" && dirListTag != "is_empty" && dirListTag != "num_files" {
4646
dirListFields = append(dirListFields, dirListTag)
4747
}
4848
}
@@ -95,6 +95,7 @@ type Ref struct {
9595
SignatureVersion int `gorm:"column:signature_version" json:"signature_version" filelist:"signature_version"`
9696
EncryptionVersion int `gorm:"column:encryption_version" json:"encryption_version" filelist:"encryption_version"`
9797
IsEmpty bool `gorm:"-" dirlist:"is_empty"`
98+
NumFiles int64 `gorm:"-" dirlist:"num_files"`
9899
HashToBeComputed bool `gorm:"-"`
99100
prevID int64 `gorm:"-"`
100101
}

0 commit comments

Comments
 (0)