🎨 Support local file system sync & backup https://github.com/siyuan-note/siyuan/pull/13663

This commit is contained in:
Daniel 2025-01-02 20:28:43 +08:00
parent 0aed11045c
commit 278a8f127d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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