From 81527c7b7c9ccb061768805877de263f72c89de2 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 11 Dec 2022 17:48:29 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E9=87=8D=E5=A4=8D=E5=89=AA=E8=97=8F?= =?UTF-8?q?=E7=9B=B8=E5=90=8C=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=90=8E=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=E6=96=87=E6=A1=A3=E4=B8=8D=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?=E6=9C=BA=E6=95=B0=20Fix=20https://github.com/siyuan-note/siyua?= =?UTF-8?q?n/issues/6851?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/path.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kernel/model/path.go b/kernel/model/path.go index e151a230b..1a4a4a101 100644 --- a/kernel/model/path.go +++ b/kernel/model/path.go @@ -24,7 +24,6 @@ import ( "sort" "strings" - "github.com/88250/gulu" "github.com/88250/lute/ast" "github.com/siyuan-note/logging" "github.com/siyuan-note/siyuan/kernel/search" @@ -35,9 +34,6 @@ import ( func createDocsByHPath(boxID, hPath, content string) (id string, existed bool, err error) { hPath = strings.TrimSuffix(hPath, ".sy") - if existed = nil != treenode.GetBlockTreeRootByHPath(boxID, hPath); existed { - hPath += "-" + gulu.Rand.String(7) - } pathBuilder := bytes.Buffer{} pathBuilder.WriteString("/") hPathBuilder := bytes.Buffer{}