Skip to content

Commit 6664551

Browse files
authored
fix(ilanzou): wrong total capacity (#1433)
1 parent eb2ff2d commit 6664551

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/ilanzou/driver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ func (d *ILanZou) GetDetails(ctx context.Context) (*model.StorageDetails, error)
409409
if err != nil {
410410
return nil, err
411411
}
412-
total := utils.Json.Get(res, "map", "totalSize").ToUint64() * 1024
412+
totalSize := utils.Json.Get(res, "map", "totalSize").ToUint64() * 1024
413+
rewardSize := utils.Json.Get(res, "map", "rewardSize").ToUint64() * 1024
414+
total := totalSize + rewardSize
413415
used := utils.Json.Get(res, "map", "usedSize").ToUint64() * 1024
414416
return &model.StorageDetails{
415417
DiskUsage: *model.NewDiskUsageFromUsedAndTotal(used, total),

0 commit comments

Comments
 (0)