From f33a534ad898e553ab4af976a6edc2331362cff2 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 9 Sep 2022 09:12:21 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E4=B8=8B=E8=BD=BD=E6=9B=B4=E6=96=B0=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8C=85=20https://github.com/siyuan-note/siyuan/issues/5837?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/conf.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/model/conf.go b/kernel/model/conf.go index 51f2a11d1..006344838 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -360,6 +360,8 @@ func Close(force bool, execInstallPkg int) (exitCode int) { exitLock.Lock() defer exitLock.Unlock() + logging.LogInfof("exiting kernel [force=%v, execInstallPkg=%d]", force, execInstallPkg) + treenode.CloseBlockTree() util.PushMsg(Conf.Language(95), 10000*60) WaitForWritingFiles() @@ -378,18 +380,16 @@ func Close(force bool, execInstallPkg int) (exitCode int) { //}) if !skipNewVerInstallPkg() { - newVerInstallPkgPath := "" - if Conf.System.DownloadInstallPkg && !util.ISMicrosoftStore { - newVerInstallPkgPath = getNewVerInstallPkgPath() - if "" != newVerInstallPkgPath && 0 == execInstallPkg { + newVerInstallPkgPath := getNewVerInstallPkgPath() + if "" != newVerInstallPkgPath { + if 0 == execInstallPkg { // 新版本安装包已经准备就绪 exitCode = 2 + logging.LogInfof("the new version install pkg is ready [%s], waiting for the user's next instruction", newVerInstallPkgPath) return + } else if 2 == execInstallPkg { // 执行新版本安装 + go execNewVerInstallPkg(newVerInstallPkgPath) } } - - if 2 == execInstallPkg && "" != newVerInstallPkgPath { // 执行新版本安装 - go execNewVerInstallPkg(newVerInstallPkgPath) - } } Conf.Close()