Sfoglia il codice sorgente

:bug: https://github.com/siyuan-note/siyuan/issues/11776 https://github.com/siyuan-note/siyuan/issues/11773

Daniel 1 anno fa
parent
commit
ef6daed3d5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      kernel/treenode/blocktree.go

+ 1 - 1
kernel/treenode/blocktree.go

@@ -204,7 +204,7 @@ func CountBlocks() (ret int) {
 
 func GetBlockTreeRootByPath(boxID, path string) (ret *BlockTree) {
 	ret = &BlockTree{}
-	sqlStmt := "SELECT * FROM blocktrees WHERE box_id = ? AND path = ?"
+	sqlStmt := "SELECT * FROM blocktrees WHERE box_id = ? AND path = ? AND type = 'd'"
 	err := db.QueryRow(sqlStmt, boxID, path).Scan(&ret.ID, &ret.RootID, &ret.ParentID, &ret.BoxID, &ret.Path, &ret.HPath, &ret.Updated, &ret.Type)
 	if nil != err {
 		ret = nil