Browse Source

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

Liang Ding 2 năm trước cách đây
mục cha
commit
43cc09af8d
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      kernel/api/workspace.go

+ 4 - 0
kernel/api/workspace.go

@@ -24,6 +24,7 @@ import (
 	"path/filepath"
 	"strings"
 	"time"
+	"unicode/utf8"
 
 	"github.com/88250/gulu"
 	"github.com/gin-gonic/gin"
@@ -233,5 +234,8 @@ func isInvalidWorkspacePath(absPath string) bool {
 	if !gulu.File.IsValidFilename(name) {
 		return true
 	}
+	if 16 < utf8.RuneCountInString(name) {
+		return true
+	}
 	return "siyuan" == name || "conf" == name || "home" == name || "data" == name || "temp" == name
 }