An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:recycle: Skip subdoc dir scan when parent doc is hidden https://github.com/siyuan-note/siyuan/issues/17533 (#17554)
Jeffrey Chenc8a093fe1d71
diff --git a/kernel/model/blockial.go b/kernel/model/blockial.goindex 1119cdcf51..bac0dad1ed 100644--- a/kernel/model/blockial.go+++ b/kernel/model/blockial.go@@ -182,8 +182,7 @@ func setNodeAttrs(node *ast.Node, tree *parse.Tree, nameValues map[string]stringpushBlockAttrs(oldAttrs, node)- if ("true" == oldAttrs[DocHiddenAttr] && "true" != nameValues[DocHiddenAttr]) ||- "true" != oldAttrs[DocHiddenAttr] && "true" == nameValues[DocHiddenAttr] {+ if ("true" == oldAttrs[DocHiddenAttr]) != ("true" == nameValues[DocHiddenAttr]) {ReloadFiletree()}diff --git a/kernel/model/push_reload.go b/kernel/model/push_reload.goindex 30237f4199..09eca81fdc 100644--- a/kernel/model/push_reload.go+++ b/kernel/model/push_reload.go@@ -135,20 +135,19 @@ func refreshDocInfo0(tree *parse.Tree, size uint64) {}subFileCount := 0- subDir := filepath.Join(util.DataDir, tree.Box, strings.TrimSuffix(tree.Path, ".sy"))- subFiles, err := os.ReadDir(subDir)- if err == nil {- for _, subFile := range subFiles {- if "true" == tree.Root.IALAttr(DocHiddenAttr) {- continue- }-- subDocIAL := filesys.DocIAL(filepath.Join(subDir, subFile.Name()))- if "true" == subDocIAL[DocHiddenAttr] {- continue- }+ if "true" != tree.Root.IALAttr(DocHiddenAttr) {+ subDir := filepath.Join(util.DataDir, tree.Box, strings.TrimSuffix(tree.Path, ".sy"))+ subFiles, err := os.ReadDir(subDir)+ if err == nil {+ for _, subFile := range subFiles {+ if !strings.HasSuffix(subFile.Name(), ".sy") {+ continue+ }- if strings.HasSuffix(subFile.Name(), ".sy") {+ subDocIAL := filesys.DocIAL(filepath.Join(subDir, subFile.Name()))+ if "true" == subDocIAL[DocHiddenAttr] {+ continue+ }subFileCount++}}