Skip to content

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

:bug: sort.json corrupted by reindex fallback https://github.com/siyuan-note/siyuan/issues/17862

Danieldde316fc468c
diff --git a/kernel/model/tree.go b/kernel/model/tree.go
index 149c16d5c3..85f3dee796 100644
--- a/kernel/model/tree.go
+++ b/kernel/model/tree.go
@@ -330,7 +330,17 @@ func findUnindexedTreePathInAllBoxes(id string) (ret string) {
var rootIDs []string
rootIDPaths := map[string]string{}
for _, p := range paths {
+ base := filepath.ToSlash(p)
+ if !strings.HasSuffix(base, ".sy") {
+ continue
+ }
+ if strings.Contains(base, "/.siyuan/") {
+ continue
+ }
rootID := util.GetTreeID(p)
+ if !ast.IsNodeIDPattern(rootID) {
+ continue
+ }
rootIDs = append(rootIDs, rootID)
rootIDPaths[rootID] = p
}