mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-28 01:44:07 +01:00
🎨 Cloud sync storage size check
This commit is contained in:
parent
d013fd1229
commit
e17aa59597
5 changed files with 10 additions and 6 deletions
|
|
@ -311,7 +311,7 @@ func syncRepo(byHand bool) {
|
|||
Dir: Conf.Sync.CloudName,
|
||||
UserID: Conf.User.UserId,
|
||||
Token: Conf.User.UserToken,
|
||||
LimitSize: int64(Conf.User.UserSiYuanRepoSize),
|
||||
LimitSize: int64(Conf.User.UserSiYuanRepoSize - Conf.User.UserSiYuanAssetSize),
|
||||
ProxyURL: Conf.System.NetworkProxy.String(),
|
||||
Server: util.AliyunServer,
|
||||
}
|
||||
|
|
@ -322,6 +322,9 @@ func syncRepo(byHand bool) {
|
|||
if nil != err {
|
||||
util.LogErrorf("sync data repo failed: %s", err)
|
||||
msg := "Sync data repo failed: " + err.Error()
|
||||
if errors.Is(err, dejavu.ErrSyncCloudStorageSizeExceeded) {
|
||||
msg = fmt.Sprintf(Conf.Language(43), byteCountSI(int64(Conf.User.UserSiYuanRepoSize)))
|
||||
}
|
||||
util.PushStatusBar(msg)
|
||||
util.PushErrMsg(msg, 0)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -135,8 +135,8 @@ func SyncData(boot, exit, byHand bool) {
|
|||
indexRepoBeforeCloudSync()
|
||||
|
||||
//同步数据仓库 https://github.com/siyuan-note/siyuan/issues/5142
|
||||
//syncRepo(byHand)
|
||||
//return // TODO: 测试
|
||||
syncRepo(byHand)
|
||||
return // TODO: 测试
|
||||
|
||||
WaitForWritingFiles()
|
||||
writingDataLock.Lock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue