Skip to content

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

:art: 定时生成文档历史数据时清理老版本的历史文件夹

Liang Dingb0d8cac943c9
diff --git a/kernel/model/history.go b/kernel/model/history.go
index 8fefad3e45..f96cdf0e36 100644
--- a/kernel/model/history.go
+++ b/kernel/model/history.go
@@ -69,18 +69,18 @@ func generateDocHistory() {
historyDir := util.HistoryDir
clearOutdatedHistoryDir(historyDir)
- // 以下部分是老版本的清理逻辑,暂时保留
+ // 以下部分是老版本的历史数据,不再保留
for _, box := range Conf.GetBoxes() {
historyDir = filepath.Join(util.DataDir, box.ID, ".siyuan", "history")
- clearOutdatedHistoryDir(historyDir)
+ os.RemoveAll(historyDir)
}
historyDir = filepath.Join(util.DataDir, "assets", ".siyuan", "history")
- clearOutdatedHistoryDir(historyDir)
+ os.RemoveAll(historyDir)
historyDir = filepath.Join(util.DataDir, ".siyuan", "history")
- clearOutdatedHistoryDir(historyDir)
+ os.RemoveAll(historyDir)
}
func ChangeHistoryTick(minutes int) {