mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Alt+5 打开已有日记时不在内核伺服客户端之间同步 Fix https://github.com/siyuan-note/siyuan/issues/5617
This commit is contained in:
parent
9fb4d9da2a
commit
8ac1104d6f
5 changed files with 41 additions and 11 deletions
|
|
@ -33,9 +33,9 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func createDocsByHPath(boxID, hPath, content string) (id string, err error) {
|
||||
func createDocsByHPath(boxID, hPath, content string) (id string, existed bool, err error) {
|
||||
hPath = strings.TrimSuffix(hPath, ".sy")
|
||||
if docExist := nil != treenode.GetBlockTreeRootByHPath(boxID, hPath); docExist {
|
||||
if existed = nil != treenode.GetBlockTreeRootByHPath(boxID, hPath); existed {
|
||||
hPath += "-" + gulu.Rand.String(7)
|
||||
}
|
||||
pathBuilder := bytes.Buffer{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue