From e5f2de355110c662566e46bdb6bc380022016f9d Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Thu, 2 May 2019 10:46:11 +0200 Subject: ptxd_make_get_http: only create the temp file when it is used Otherwise, the empty file remains if the urlcheck succeeds. Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_make_get.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh index 3d1769b26..a366ef900 100644 --- a/scripts/lib/ptxd_make_get.sh +++ b/scripts/lib/ptxd_make_get.sh @@ -61,9 +61,9 @@ ptxd_make_get_http() { # remove any pending or half downloaded files rm -f -- "${path}."* - temp_file="$(mktemp "${path}.XXXXXXXXXX")" || ptxd_bailout "failed to create tempfile" ptxd_make_serialize_take if [ "${ptxd_make_get_dryrun}" != "y" ]; then + temp_file="$(mktemp "${path}.XXXXXXXXXX")" || ptxd_bailout "failed to create tempfile" wget \ --passive-ftp \ --progress=bar:force \ -- cgit v1.2.3