From efd4ff0f32d012b5167d19e6caf96eab844d1c84 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 9 Jan 2026 09:28:28 +0800 Subject: [PATCH] :art: Clean code Signed-off-by: Daniel <845765@qq.com> --- kernel/model/conf.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/model/conf.go b/kernel/model/conf.go index 960c4e44a..c617b5385 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") }