From 278a8f127d485615f3388ce291fa1e887cacb669 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 2 Jan 2025 20:28:43 +0800 Subject: [PATCH] :art: Support local file system sync & backup https://github.com/siyuan-note/siyuan/pull/13663 --- kernel/model/sync.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/sync.go b/kernel/model/sync.go index 51522f380..8aedef982 100644 --- a/kernel/model/sync.go +++ b/kernel/model/sync.go @@ -483,13 +483,13 @@ func SetSyncProviderLocal(local *conf.Local) (err error) { return } if !gulu.File.IsExist(absPath) { - msg := fmt.Sprintf("endpoint [%s] not exist", local.Endpoint+" ("+absPath+")") + msg := fmt.Sprintf("endpoint [%s] not exist", local.Endpoint) logging.LogErrorf(msg) err = errors.New(fmt.Sprintf(Conf.Language(77), msg)) return } - if util.IsAbsPathInWorkspace(absPath) { - msg := fmt.Sprintf("endpoint [%s] is in workspace", local.Endpoint+" ("+absPath+")") + if util.IsAbsPathInWorkspace(absPath) || filepath.Clean(absPath) == filepath.Clean(util.WorkspaceDir) { + msg := fmt.Sprintf("endpoint [%s] is in workspace", local.Endpoint) logging.LogErrorf(msg) err = errors.New(fmt.Sprintf(Conf.Language(77), msg)) return