mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 16:28:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b31361a692
1 changed files with 7 additions and 1 deletions
|
|
@ -147,10 +147,16 @@ func downloadInstallPkg(pkgURL, checksum string) {
|
|||
}
|
||||
}
|
||||
|
||||
err := os.MkdirAll(filepath.Join(util.TempDir, "install"), 0755)
|
||||
if nil != err {
|
||||
logging.LogErrorf("create temp install dir failed: %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
logging.LogInfof("downloading install package [%s]", pkgURL)
|
||||
msgId := util.PushMsg(Conf.Language(103), 60*1000*10)
|
||||
client := req.C().SetTLSHandshakeTimeout(7 * time.Second).SetTimeout(10 * time.Minute)
|
||||
err := client.NewParallelDownload(pkgURL).SetConcurrency(8).SetSegmentSize(1024 * 1024 * 2).
|
||||
err = client.NewParallelDownload(pkgURL).SetConcurrency(8).SetSegmentSize(1024 * 1024 * 2).
|
||||
SetOutputFile(savePath).Do()
|
||||
if nil != err {
|
||||
logging.LogErrorf("download install package failed: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue