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

This commit is contained in:
Liang Ding 2023-02-16 17:42:51 +08:00
parent 9ac2240120
commit b0d8cac943
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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) {