This commit is contained in:
Liang Ding 2023-01-05 19:39:01 +08:00
parent 0fb04830db
commit 43cc09af8d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

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