Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve sync provider local file system endpoint setting https://github.com/siyuan-note/siyuan/issues/13744

Daniel9b02cd192fce
diff --git a/kernel/model/sync.go b/kernel/model/sync.go
index d77aecde21..7bd209ee9f 100644
--- a/kernel/model/sync.go
+++ b/kernel/model/sync.go
@@ -495,6 +495,13 @@ func SetSyncProviderLocal(local *conf.Local) (err error) {
return
}
+ if util.IsSubPath(absPath, util.WorkspaceDir) {
+ msg := fmt.Sprintf("endpoint [%s] is parent of workspace", local.Endpoint)
+ logging.LogErrorf(msg)
+ err = errors.New(fmt.Sprintf(Conf.Language(77), msg))
+ return
+ }
+
local.Timeout = util.NormalizeTimeout(local.Timeout)
local.ConcurrentReqs = util.NormalizeConcurrentReqs(local.ConcurrentReqs, conf.ProviderLocal)