Skip to content

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

:art: 桌面端内核进程根据 Electron 主进程判断是否自动退出 Fix https://github.com/siyuan-note/siyuan/issues/7002

Liang Ding8d77634807d6
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index 00c9a09dcb..842f246a02 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -675,7 +675,6 @@ func clearWorkspaceTemp() {
os.RemoveAll(filepath.Join(util.TempDir, "import"))
os.RemoveAll(filepath.Join(util.TempDir, "repo"))
os.RemoveAll(filepath.Join(util.TempDir, "os"))
- os.RemoveAll(filepath.Join(util.DataDir, "assets", ".siyuan", "assets.json"))
// 退出时自动删除超过 7 天的安装包 https://github.com/siyuan-note/siyuan/issues/6128
install := filepath.Join(util.TempDir, "install")
@@ -720,5 +719,10 @@ func clearWorkspaceTemp() {
}
}
+ // 老版本遗留文件清理
+ os.RemoveAll(filepath.Join(util.DataDir, "assets", ".siyuan", "assets.json"))
+ os.RemoveAll(filepath.Join(util.WorkspaceDir, "backup"))
+ os.RemoveAll(filepath.Join(util.WorkspaceDir, "sync"))
+
logging.LogInfof("cleared workspace temp")
}
diff --git a/kernel/model/process.go b/kernel/model/process.go
index 8785a9b69e..0f73e81659 100644
--- a/kernel/model/process.go
+++ b/kernel/model/process.go
@@ -42,7 +42,6 @@ func HookDesktopUIProc() {
return
}
- time.Sleep(30 * time.Second)
uiProcNames := []string{"siyuan", "electron"}
existUIProc := false
for range time.Tick(7 * time.Second) {