mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 桌面端内核进程根据 Electron 主进程判断是否自动退出 Fix https://github.com/siyuan-note/siyuan/issues/7002
This commit is contained in:
parent
4021003629
commit
8d77634807
2 changed files with 5 additions and 2 deletions
|
|
@ -675,7 +675,6 @@ func clearWorkspaceTemp() {
|
||||||
os.RemoveAll(filepath.Join(util.TempDir, "import"))
|
os.RemoveAll(filepath.Join(util.TempDir, "import"))
|
||||||
os.RemoveAll(filepath.Join(util.TempDir, "repo"))
|
os.RemoveAll(filepath.Join(util.TempDir, "repo"))
|
||||||
os.RemoveAll(filepath.Join(util.TempDir, "os"))
|
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
|
// 退出时自动删除超过 7 天的安装包 https://github.com/siyuan-note/siyuan/issues/6128
|
||||||
install := filepath.Join(util.TempDir, "install")
|
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")
|
logging.LogInfof("cleared workspace temp")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ func HookDesktopUIProc() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
time.Sleep(30 * time.Second)
|
|
||||||
uiProcNames := []string{"siyuan", "electron"}
|
uiProcNames := []string{"siyuan", "electron"}
|
||||||
existUIProc := false
|
existUIProc := false
|
||||||
for range time.Tick(7 * time.Second) {
|
for range time.Tick(7 * time.Second) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue