Fix aria2 using wrong destination directory

If you have set a download directory in aria2's config, quickget will
download files to the wrong directory. This overwrites that setting and
downloads files to the correct location.

Quote from `aria2c(1)`:
> `-o, --out=<FILE>`
>   The file name of the downloaded file. It is
>   always relative to the directory given in
>   `--dir` option.
pull/692/head
deraffe 1 year ago committed by Martin Wimpress
parent 8b256bb57d
commit 6a612bd104
  1. 2
      quickget

@ -741,7 +741,7 @@ function web_get() {
fi fi
if command -v aria2c &>/dev/null; then if command -v aria2c &>/dev/null; then
if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" -o "${DIR}/${FILE}"; then if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then
echo #Necessary as aria2c in suppressed mode does not have new lines echo #Necessary as aria2c in suppressed mode does not have new lines
echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again." echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again."
exit 1 exit 1

Loading…
Cancel
Save