🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837
This commit is contained in:
parent
e2a6780cec
commit
0380971327
1 changed files with 10 additions and 0 deletions
|
@ -24,6 +24,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/imroc/req/v3"
|
||||
|
@ -31,11 +32,20 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
var checkDownloadInstallPkgLock = sync.Mutex{}
|
||||
|
||||
func checkDownloadInstallPkg() {
|
||||
if !Conf.System.DownloadInstallPkg {
|
||||
return
|
||||
}
|
||||
|
||||
if util.IsMutexLocked(&checkDownloadInstallPkgLock) {
|
||||
return
|
||||
}
|
||||
|
||||
checkDownloadInstallPkgLock.Lock()
|
||||
defer checkDownloadInstallPkgLock.Unlock()
|
||||
|
||||
result, err := util.GetRhyResult(false)
|
||||
if nil != err {
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue