Ver Fonte

:art: 移动端支持多工作空间 Fix https://github.com/siyuan-note/siyuan/issues/4642

Liang Ding há 2 anos atrás
pai
commit
dae28aacb0
1 ficheiros alterados com 5 adições e 4 exclusões
  1. 5 4
      kernel/api/workspace.go

+ 5 - 4
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
 	}