mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 15:04:07 +01:00
🎨 Data repo no longer automatically resets after corrupted https://github.com/siyuan-note/siyuan/issues/10580
This commit is contained in:
parent
e58520b6ce
commit
d90dff900e
4 changed files with 6 additions and 14 deletions
|
|
@ -1163,7 +1163,6 @@ func bootSyncRepo() (err error) {
|
|||
autoSyncErrCount++
|
||||
planSyncAfter(fixSyncInterval)
|
||||
|
||||
logging.LogErrorf("data repo is corrupted: %s", err)
|
||||
msg := fmt.Sprintf(Conf.Language(80), formatRepoErrorMsg(err))
|
||||
Conf.Sync.Stat = msg
|
||||
Conf.Save()
|
||||
|
|
@ -1518,12 +1517,10 @@ func indexRepoBeforeCloudSync(repo *dejavu.Repo) (beforeIndex, afterIndex *entit
|
|||
afterIndex, err = repo.Index("[Sync] Cloud sync", map[string]interface{}{
|
||||
eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBar,
|
||||
})
|
||||
if errors.Is(err, dejavu.ErrNotFoundObject) {
|
||||
logging.LogErrorf("data repo is corrupted: %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
if nil != err {
|
||||
if errors.Is(err, dejavu.ErrNotFoundObject) {
|
||||
err = dejavu.ErrRepoFatal
|
||||
}
|
||||
msg := fmt.Sprintf(Conf.Language(140), formatRepoErrorMsg(err))
|
||||
util.PushStatusBar(msg)
|
||||
util.PushErrMsg(msg, 12000)
|
||||
|
|
|
|||
|
|
@ -221,7 +221,6 @@ func syncData(exit, byHand bool) {
|
|||
logging.LogErrorf("write websocket message failed: %v", writeErr)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue