From 95cf1d8a0042926ca6cf5847caaa3c1931bb0594 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 9 Feb 2023 21:07:36 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=89=94=E9=99=A4=20`=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E6=96=87=E6=A1=A3=E5=AD=98=E6=94=BE=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?`=20=E5=8F=82=E6=95=B0=E7=BB=93=E5=B0=BE=E7=9A=84=20`/`=20Fix?= =?UTF-8?q?=20https://github.com/siyuan-note/siyuan/issues/7315?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/conf.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/model/conf.go b/kernel/model/conf.go index cf676be22..e8e9b9522 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -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() }