From c20e01d09471bb19fcd8d90b88ec7af1970d4438 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 1 Jan 2010 17:09:52 +0100 Subject: 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. 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... -- cgit v0.10.2-6-g49f6