core: 设置aria2允许覆盖源文件,和curl行为一致

This commit is contained in:
bin456789 2023-07-06 21:39:32 +08:00
parent 9003e5cffa
commit 8b4538441c
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -50,7 +50,7 @@ download() {
# axel 在 lightsail 上会占用大量cpu
# 先用 aria2 下载
[ -z $file ] && save="" || save="-d / -o $file"
if ! aria2c -x4 $url $save; then
if ! aria2c -x4 --allow-overwrite=true $url $save; then
# 出错再用 curl
[ -z $file ] && save="-O" || save="-o $file"
curl -L $url $save