# HG changeset patch # User "Yann E. MORIN" # Date 1262362192 -3600 # Node ID ecb7fcc4edb01a5c19d3fe085b33971132d505af # Parent 636126117b8c46bd288e007662a02917ac8a19f9 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 -r 636126117b8c -r ecb7fcc4edb0 scripts/functions --- a/scripts/functions Fri Jan 01 12:27:06 2010 +0100 +++ b/scripts/functions Fri Jan 01 17:09:52 2010 +0100 @@ -356,7 +356,7 @@ # 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...