Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 重复剪藏相同的页面后创建的文档不跟随机数 Fix https://github.com/siyuan-note/siyuan/issues/6851

Liang Ding81527c7b7c9c
diff --git a/kernel/model/path.go b/kernel/model/path.go
index e151a230ba..1a4a4a1017 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{}