🎨 Trim space in dialynote/block ref/new doc save path https://github.com/siyuan-note/siyuan/issues/14482

This commit is contained in:
Daniel 2025-03-31 15:29:59 +08:00
parent 54c25af19f
commit 4c080e2b34
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 15 additions and 6 deletions

View file

@ -399,14 +399,14 @@ func setFiletree(c *gin.Context) {
return
}
fileTree.RefCreateSavePath = strings.TrimSpace(fileTree.RefCreateSavePath)
fileTree.RefCreateSavePath = util.TrimSpaceInPath(fileTree.RefCreateSavePath)
if "" != fileTree.RefCreateSavePath {
if !strings.HasSuffix(fileTree.RefCreateSavePath, "/") {
fileTree.RefCreateSavePath += "/"
}
}
fileTree.DocCreateSavePath = strings.TrimSpace(fileTree.DocCreateSavePath)
fileTree.DocCreateSavePath = util.TrimSpaceInPath(fileTree.DocCreateSavePath)
if 1 > fileTree.MaxOpenTabCount {
fileTree.MaxOpenTabCount = 8