summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-01-01 16:09:52 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-01-01 16:09:52 (GMT)
commitc20e01d09471bb19fcd8d90b88ec7af1970d4438 (patch)
tree8ce30c561478f5fcc001f8c885a2ccc496646c6e /scripts/functions
parentb9eba0996aa7a8f79e302329be76aeaf9cf7294a (diff)
scripts/functions: fix downloading with aria2
In case the remote file does not exist (and probably for some other reasons as well), aria2 nonetheless creates an empty file (or not empty for some other reasons). The solution is to delete the file whenever aria2 fails.
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index caaa8ab..fae2582 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -356,7 +356,7 @@ CT_DoGetFileAria2() {
# so that the CT-NG's ouput is 'live'.
CT_DoExecLog ALL aria2c -l - -s ${CT_DOWNLOAD_MAX_CHUNKS} -m 3 -t ${CT_CONNECT_TIMEOUT} -p "$1" \
|| CT_DoExecLog ALL aria2c -l - -s ${CT_DOWNLOAD_MAX_CHUNKS} -m 3 -t ${CT_CONNECT_TIMEOUT} "$1" \
- || true
+ || rm -f "${1##*/}"
}
# OK, just look if we have them...