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/4642

Liang Dingdae28aacb0b7
diff --git a/kernel/api/workspace.go b/kernel/api/workspace.go
index d29a7c64a9..b5a4ad1e4d 100644
--- a/kernel/api/workspace.go
+++ b/kernel/api/workspace.go
@@ -45,14 +45,15 @@ func createWorkspaceDir(c *gin.Context) {
absPath := arg["path"].(string)
absPath = gulu.Str.RemoveInvisible(absPath)
absPath = strings.TrimSpace(absPath)
- if gulu.File.IsExist(absPath) {
+ if isInvalidWorkspacePath(absPath) {
ret.Code = -1
- ret.Msg = model.Conf.Language(78)
+ ret.Msg = "This workspace name is not allowed, please use another name"
return
}
- if isInvalidWorkspacePath(absPath) {
+
+ if gulu.File.IsExist(absPath) {
ret.Code = -1
- ret.Msg = "This workspace name is not allowed, please use another name"
+ ret.Msg = model.Conf.Language(78)
return
}