Skip to content

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

:art: 改进云端同步目录名称校验 Fix https://github.com/siyuan-note/siyuan/issues/5090

Liang Dingb9eaba06899c
diff --git a/kernel/model/sync.go b/kernel/model/sync.go
index 33e51cf2c4..15339f2b08 100644
--- a/kernel/model/sync.go
+++ b/kernel/model/sync.go
@@ -30,6 +30,7 @@ import (
"strings"
"sync"
"time"
+ "unicode/utf8"
"github.com/88250/gulu"
"github.com/dustin/go-humanize"
@@ -1202,7 +1203,8 @@ func IsValidCloudDirName(cloudDirName string) bool {
if "backup" == cloudDirName {
return false
}
- if 16 < len(cloudDirName) {
+
+ if 16 < utf8.RuneCountInString(cloudDirName) {
return false
}
@@ -1216,9 +1218,7 @@ func IsValidCloudDirName(cloudDirName string) bool {
if strings.ContainsAny(cloudDirName, charsStr) {
return false
}
-
- tmp := util.RemoveInvisible(cloudDirName)
- return tmp == cloudDirName
+ return true
}
func getSyncIgnoreList() (ret *hashset.Set) {