🐛 未登录情况下创建数据快照失败 Fix https://github.com/siyuan-note/siyuan/issues/6448

This commit is contained in:
Liang Ding 2022-11-02 08:27:41 +08:00
parent 64ccd06dd4
commit 4b46e2c3d6
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 14 additions and 9 deletions

View file

@ -1007,18 +1007,19 @@ func buildCloudConf() (ret *cloud.Conf, err error) {
Conf.Save()
}
userId, token := "0", ""
userId, token, availableSize := "0", "", int64(1024*1024*1024*1024*2)
if nil != Conf.User {
userId = Conf.User.UserId
token = Conf.User.UserToken
availableSize = Conf.User.GetCloudRepoAvailableSize()
}
ret = &cloud.Conf{
Dir: Conf.Sync.CloudName,
UserID: userId,
Token: token,
LimitSize: int64(Conf.User.UserSiYuanRepoSize - Conf.User.UserSiYuanAssetSize),
Server: util.AliyunServer,
Dir: Conf.Sync.CloudName,
UserID: userId,
Token: token,
AvailableSize: availableSize,
Server: util.AliyunServer,
}
return
}