mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 The save path is incorrect when creating a sub-doc by ref in a doc with the same name https://github.com/siyuan-note/siyuan/issues/8138
This commit is contained in:
parent
d21b122429
commit
5ad9de9541
2 changed files with 4 additions and 4 deletions
|
|
@ -258,10 +258,10 @@ func GetBlockTreeRootsByHPath(boxID, hPath string) (ret []*BlockTree) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetBlockTreeRootByHPathPreferredParentID(boxID, hPath, preferredParentID string) (ret *BlockTree) {
|
||||
func GetBlockTreeByHPathPreferredParentID(boxID, hPath, preferredParentID string) (ret *BlockTree) {
|
||||
hPath = gulu.Str.RemoveInvisible(hPath)
|
||||
var roots []*BlockTree
|
||||
sqlStmt := "SELECT * FROM blocktrees WHERE box_id = ? AND hpath = ? AND parent_id = ? AND type = 'd'"
|
||||
sqlStmt := "SELECT * FROM blocktrees WHERE box_id = ? AND hpath = ? AND parent_id = ? LIMIT 1"
|
||||
rows, err := db.Query(sqlStmt, boxID, hPath, preferredParentID)
|
||||
if err != nil {
|
||||
logging.LogErrorf("sql query [%s] failed: %s", sqlStmt, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue