🐛 剔除 新建文档存放位置 参数结尾的 / Fix https://github.com/siyuan-note/siyuan/issues/7315

This commit is contained in:
Liang Ding 2023-02-09 21:05:29 +08:00
parent e058890d8f
commit 3f0dd873fb
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -168,6 +168,12 @@ func setFiletree(c *gin.Context) {
}
}
fileTree.DocCreateSavePath = strings.TrimSpace(fileTree.DocCreateSavePath)
for strings.HasSuffix(fileTree.DocCreateSavePath, "/") {
fileTree.DocCreateSavePath = strings.TrimSuffix(fileTree.DocCreateSavePath, "/")
fileTree.DocCreateSavePath = strings.TrimSpace(fileTree.DocCreateSavePath)
}
if 1 > fileTree.MaxOpenTabCount {
fileTree.MaxOpenTabCount = 8
}