mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 13:38:06 +01:00
🎨 Sync repo
This commit is contained in:
parent
74a84b61b7
commit
9e1220faa7
3 changed files with 7 additions and 5 deletions
|
|
@ -272,7 +272,7 @@ func indexRepoBeforeCloudSync() {
|
|||
if nil != latest {
|
||||
if latest.ID != index.ID {
|
||||
// 对新创建的快照需要更新备注,加入耗时统计
|
||||
index.Memo = fmt.Sprintf("[Auto] Cloud sync, completed in [%.2fs]", elapsed.Seconds())
|
||||
index.Memo = fmt.Sprintf("[Auto] Cloud sync, completed in %.2fs", elapsed.Seconds())
|
||||
err = repo.PutIndex(index)
|
||||
if nil != err {
|
||||
util.PushStatusBar("Save data snapshot for cloud sync failed")
|
||||
|
|
@ -312,7 +312,9 @@ func syncRepo() (err error) {
|
|||
util.LogInfof("sync data repo elapsed [%.2fs], latest [%s]", elapsed.Seconds(), latest.ID)
|
||||
if nil != err {
|
||||
util.LogErrorf("sync data repo failed: %s", err)
|
||||
util.PushStatusBar("Sync data repo failed: " + err.Error())
|
||||
msg := "Sync data repo failed: " + err.Error()
|
||||
util.PushStatusBar(msg)
|
||||
util.PushErrMsg(msg, 0)
|
||||
return
|
||||
}
|
||||
util.PushStatusBar(fmt.Sprintf(Conf.Language(149)+" [%s]", elapsed.Seconds(), latest.ID[:7]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue