An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: v2.7.1-dev2未启用数据同步退出时显示同步失败 Fix https://github.com/siyuan-note/siyuan/issues/7164
Liang Ding664922028305
diff --git a/kernel/model/conf.go b/kernel/model/conf.goindex e0c57b9f65..b27c07d53c 100644--- a/kernel/model/conf.go+++ b/kernel/model/conf.go@@ -399,10 +399,12 @@ func Close(force bool, execInstallPkg int) (exitCode int) {WaitForWritingFiles()if !force {- syncData(false, true, false)- if 0 != ExitSyncSucc {- exitCode = 1- return+ if Conf.Sync.Enabled && ((IsSubscriber() && conf.ProviderSiYuan == Conf.Sync.Provider) || conf.ProviderSiYuan != Conf.Sync.Provider) {+ syncData(false, true, false)+ if 0 != ExitSyncSucc {+ exitCode = 1+ return+ }}}diff --git a/kernel/model/sync.go b/kernel/model/sync.goindex bac54db5aa..ff2ff2309f 100644--- a/kernel/model/sync.go+++ b/kernel/model/sync.go@@ -91,7 +91,6 @@ func BootSyncData() {}func SyncData(boot, exit, byHand bool) {- util.BroadcastByType("main", "syncing", 0, Conf.Language(81), nil)syncData(boot, exit, byHand)}@@ -161,10 +160,6 @@ func checkSync(boot, exit, byHand bool) bool {return false}- if !cloud.IsValidCloudDirName(Conf.Sync.CloudName) {- return false- }-if util.IsMutexLocked(&syncLock) {logging.LogWarnf("sync is in progress")planSyncAfter(30 * time.Second)