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