🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837

This commit is contained in:
Liang Ding 2022-09-09 09:03:39 +08:00
parent 395eeb6cdb
commit 920ead1e01
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 8 additions and 8 deletions

View file

@ -380,7 +380,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
if !skipNewVerInstallPkg() {
newVerInstallPkgPath := ""
if Conf.System.DownloadInstallPkg && !util.ISMicrosoftStore {
newVerInstallPkgPath = GetNewVerInstallPkgPath()
newVerInstallPkgPath = getNewVerInstallPkgPath()
if "" != newVerInstallPkgPath && 0 == execInstallPkg {
exitCode = 2
return
@ -388,7 +388,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
}
if 2 == execInstallPkg && "" != newVerInstallPkgPath { // 执行新版本安装
execNewVerInstallPkg(newVerInstallPkgPath)
go execNewVerInstallPkg(newVerInstallPkgPath)
}
}

View file

@ -240,7 +240,7 @@ func AutoRefreshCheck() {
time.Sleep(3 * time.Minute)
checkDownloadInstallPkg()
if "" != GetNewVerInstallPkgPath() {
if "" != getNewVerInstallPkgPath() {
util.PushMsg(Conf.Language(61), 0)
}
}()

View file

@ -54,7 +54,7 @@ func execNewVerInstallPkg(newVerInstallPkgPath string) {
logging.LogInfof("installed new version output [%s]", data)
}
func GetNewVerInstallPkgPath() string {
func getNewVerInstallPkgPath() string {
if skipNewVerInstallPkg() {
return ""
}