Skip to content

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

:art: Improve remove box

Daniel2ff36e31c05c
diff --git a/kernel/model/mount.go b/kernel/model/mount.go
index a328e31ec5..c33a6aca37 100644
--- a/kernel/model/mount.go
+++ b/kernel/model/mount.go
@@ -139,6 +139,8 @@ func RemoveBox(boxID string) (err error) {
return fmt.Errorf("can not remove [%s] caused by it is not a dir", boxID)
}
+ unmount0(boxID)
+
if !isUserGuide {
var historyDir string
historyDir, err = getHistoryDir(HistoryOpDelete)
@@ -174,7 +176,6 @@ func RemoveBox(boxID string) (err error) {
}
}
- unmount0(boxID)
if err = filelock.Remove(localPath); err != nil {
return
}