Skip to content

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

:art: Clean code

Danielefd4ff0f32d0
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index 960c4e44af..c617b5385f 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -1113,13 +1113,11 @@ func clearCorruptedNotebooks() {
func clearWorkspaceTemp() {
os.RemoveAll(filepath.Join(util.TempDir, "bazaar"))
os.RemoveAll(filepath.Join(util.TempDir, "export"))
- os.RemoveAll(filepath.Join(util.TempDir, "convert"))
os.RemoveAll(filepath.Join(util.TempDir, "import"))
+ os.RemoveAll(filepath.Join(util.TempDir, "convert"))
os.RemoveAll(filepath.Join(util.TempDir, "repo"))
os.RemoveAll(filepath.Join(util.TempDir, "os"))
os.RemoveAll(filepath.Join(util.TempDir, "base64"))
- os.RemoveAll(filepath.Join(util.TempDir, "blocktree.msgpack")) // v2.7.2 前旧版的块树数据
- os.RemoveAll(filepath.Join(util.TempDir, "blocktree")) // v3.1.0 前旧版的块树数据
// 退出时自动删除超过 7 天的安装包 https://github.com/siyuan-note/siyuan/issues/6128
install := filepath.Join(util.TempDir, "install")
@@ -1169,7 +1167,9 @@ func clearWorkspaceTemp() {
os.RemoveAll(filepath.Join(util.DataDir, ".siyuan", "history"))
os.RemoveAll(filepath.Join(util.WorkspaceDir, "backup"))
os.RemoveAll(filepath.Join(util.WorkspaceDir, "sync"))
- os.RemoveAll(filepath.Join(util.DataDir, "%")) // v3.0.6 生成的错误历史文件夹
+ os.RemoveAll(filepath.Join(util.TempDir, "blocktree.msgpack")) // v2.7.2 前旧版的块树数据
+ os.RemoveAll(filepath.Join(util.DataDir, "%")) // v3.0.6 生成的错误历史文件夹
+ os.RemoveAll(filepath.Join(util.TempDir, "blocktree")) // v3.1.0 前旧版的块树数据
logging.LogInfof("cleared workspace temp")
}