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

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

View file

@ -168,6 +168,12 @@ func InitConf() {
if 32 < Conf.FileTree.MaxOpenTabCount {
Conf.FileTree.MaxOpenTabCount = 32
}
Conf.FileTree.DocCreateSavePath = strings.TrimSpace(Conf.FileTree.DocCreateSavePath)
for strings.HasSuffix(Conf.FileTree.DocCreateSavePath, "/") {
Conf.FileTree.DocCreateSavePath = strings.TrimSuffix(Conf.FileTree.DocCreateSavePath, "/")
Conf.FileTree.DocCreateSavePath = strings.TrimSpace(Conf.FileTree.DocCreateSavePath)
}
if nil == Conf.Tag {
Conf.Tag = conf.NewTag()
}