From 6a612bd104733dec60c27374cfce727d89b043fa Mon Sep 17 00:00:00 2001 From: deraffe Date: Tue, 11 Apr 2023 15:58:21 +0200 Subject: [PATCH] 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=` > The file name of the downloaded file. It is > always relative to the directory given in > `--dir` option. --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index aa2117f..c174a84 100755 --- a/quickget +++ b/quickget @@ -741,7 +741,7 @@ function web_get() { fi 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 "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again." exit 1