Skip to content

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

:art: 兼容文件同步和快照同步

Liang Ding5f6e416f5a7b
diff --git a/kernel/model/sync.go b/kernel/model/sync.go
index 3610430ae1..98423f7ca9 100644
--- a/kernel/model/sync.go
+++ b/kernel/model/sync.go
@@ -447,6 +447,9 @@ func incReindex(upserts, removes []string) {
}
upsertFile = filepath.ToSlash(upsertFile)
+ if strings.HasPrefix(upsertFile, "/") {
+ upsertFile = upsertFile[1:]
+ }
box := upsertFile[:strings.Index(upsertFile, "/")]
p := strings.TrimPrefix(upsertFile, box)
tree, err0 := LoadTree(box, p)