An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 同步创建数据快照失败 https://github.com/siyuan-note/siyuan/issues/6106
Liang Ding421a80071fca
diff --git a/kernel/go.mod b/kernel/go.modindex bc66f328b5..8d5fa90bf8 100644--- a/kernel/go.mod+++ b/kernel/go.mod@@ -37,7 +37,7 @@ require (github.com/patrickmn/go-cache v2.1.0+incompatiblegithub.com/qiniu/go-sdk/v7 v7.13.0github.com/radovskyb/watcher v1.0.7- github.com/siyuan-note/dejavu v0.0.0-20220930021019-e62491947339+ github.com/siyuan-note/dejavu v0.0.0-20221008180903-80366e53821agithub.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75github.com/siyuan-note/eventbus v0.0.0-20220916025349-3ac6e75522dagithub.com/siyuan-note/filelock v0.0.0-20221007163134-7e64809023efdiff --git a/kernel/go.sum b/kernel/go.sumindex 10e0ced86d..aabe7729e3 100644--- a/kernel/go.sum+++ b/kernel/go.sum@@ -347,6 +347,8 @@ github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDgithub.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=github.com/siyuan-note/dejavu v0.0.0-20220930021019-e62491947339 h1:jePYjiGBPa5Qs8bCdlPDrRzfNxr0FJ+rQYv/d6H5p8A=github.com/siyuan-note/dejavu v0.0.0-20220930021019-e62491947339/go.mod h1:Y+bg0j0Z7C66oJWPPYMs+wZuFeiTRWhh2aLkqctJFKk=+github.com/siyuan-note/dejavu v0.0.0-20221008180903-80366e53821a h1:5zn/SFVvih7nwr8bRB9qeZ9NHfjSUA9dneEMqNzsPps=+github.com/siyuan-note/dejavu v0.0.0-20221008180903-80366e53821a/go.mod h1:Y+bg0j0Z7C66oJWPPYMs+wZuFeiTRWhh2aLkqctJFKk=github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75 h1:Bi7/7f29LW+Fm0cHc0J1NO1cZqyJwljSWVmfOqVZgaE=github.com/siyuan-note/encryption v0.0.0-20220713091850-5ecd92177b75/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=github.com/siyuan-note/eventbus v0.0.0-20220916025349-3ac6e75522da h1:/jNhl7LC+9BhkWvNxuJDdsNfA/2wvfuj9mqWx4CbV90=diff --git a/kernel/model/repository.go b/kernel/model/repository.goindex fdcfdbc3cc..244fe74f02 100644--- a/kernel/model/repository.go+++ b/kernel/model/repository.go@@ -681,6 +681,18 @@ func indexRepoBeforeCloudSync(repo *dejavu.Repo) (err error) {index, err := repo.Index("[Sync] Cloud sync", map[string]interface{}{eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBar,})+ if errors.Is(err, dejavu.ErrNotFoundObject) {+ resetErr := os.RemoveAll(filepath.Join(repo.Path))+ if nil != resetErr {+ logging.LogErrorf("reset data repo failed: %s", resetErr)+ return+ }+ logging.LogWarnf("data repo has been reset caused by not found object")+ index, err = repo.Index("[Sync] Cloud sync", map[string]interface{}{+ eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBar,+ })+ }+if nil != err {msg := fmt.Sprintf(Conf.Language(140), formatErrorMsg(err))util.PushStatusBar(msg)