mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
🐛 Fix npe
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
89536ceb19
commit
247d8e46f1
1 changed files with 8 additions and 7 deletions
|
|
@ -2263,13 +2263,14 @@ func GetCloudSpace() (s *Sync, b *Backup, hSize, hAssetSize, hTotalSize, hExchan
|
|||
b.HSize = humanize.BytesCustomCeil(uint64(backupSize), 2)
|
||||
hAssetSize = humanize.BytesCustomCeil(uint64(assetSize), 2)
|
||||
hSize = humanize.BytesCustomCeil(uint64(totalSize), 2)
|
||||
u := Conf.GetUser()
|
||||
hTotalSize = humanize.BytesCustomCeil(uint64(u.UserSiYuanRepoSize), 2)
|
||||
hExchangeSize = humanize.BytesCustomCeil(uint64(u.UserSiYuanPointExchangeRepoSize), 2)
|
||||
hTrafficUploadSize = humanize.BytesCustomCeil(uint64(u.UserTrafficUpload), 2)
|
||||
hTrafficDownloadSize = humanize.BytesCustomCeil(uint64(u.UserTrafficDownload), 2)
|
||||
hTrafficAPIGet = humanize.SIWithDigits(u.UserTrafficAPIGet, 2, "")
|
||||
hTrafficAPIPut = humanize.SIWithDigits(u.UserTrafficAPIPut, 2, "")
|
||||
if u := Conf.GetUser(); nil != u {
|
||||
hTotalSize = humanize.BytesCustomCeil(uint64(u.UserSiYuanRepoSize), 2)
|
||||
hExchangeSize = humanize.BytesCustomCeil(uint64(u.UserSiYuanPointExchangeRepoSize), 2)
|
||||
hTrafficUploadSize = humanize.BytesCustomCeil(uint64(u.UserTrafficUpload), 2)
|
||||
hTrafficDownloadSize = humanize.BytesCustomCeil(uint64(u.UserTrafficDownload), 2)
|
||||
hTrafficAPIGet = humanize.SIWithDigits(u.UserTrafficAPIGet, 2, "")
|
||||
hTrafficAPIPut = humanize.SIWithDigits(u.UserTrafficAPIPut, 2, "")
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue