mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-03 06:01:47 +01:00
🎨 改进云端数据同步
This commit is contained in:
parent
412f6d0303
commit
3d514b6d31
9 changed files with 18 additions and 14 deletions
|
|
@ -253,8 +253,10 @@ func UploadCloudSnapshot(tag, id string) (err error) {
|
|||
uploadFileCount, uploadChunkCount, uploadBytes, err := repo.UploadTagIndex(tag, id, cloudInfo, map[string]interface{}{dejavu.CtxPushMsg: dejavu.CtxPushMsgToStatusBarAndProgress})
|
||||
if nil != err {
|
||||
if errors.Is(err, dejavu.ErrCloudBackupCountExceeded) {
|
||||
err = errors.New(Conf.Language(154))
|
||||
err = fmt.Errorf(Conf.Language(84), Conf.Language(154))
|
||||
return
|
||||
}
|
||||
err = errors.New(fmt.Sprintf(Conf.Language(84), formatErrorMsg(err)))
|
||||
return
|
||||
}
|
||||
msg := fmt.Sprintf(Conf.Language(152), uploadFileCount, uploadChunkCount, humanize.Bytes(uint64(uploadBytes)))
|
||||
|
|
|
|||
|
|
@ -296,6 +296,8 @@ func formatErrorMsg(err error) string {
|
|||
msg = Conf.Language(85) + " " + err.Error()
|
||||
} else if strings.Contains(msg, "cipher: message authentication failed") {
|
||||
msg = Conf.Language(172) + " " + err.Error()
|
||||
} else if strings.Contains(msg, "repo fatal error") {
|
||||
msg = Conf.Language(23) + " " + err.Error()
|
||||
}
|
||||
msg = msg + " v" + util.Ver
|
||||
return msg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue