diff options
author | Petr Štetiar <ynezz@true.cz> | 2020-11-27 21:56:30 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2020-11-27 22:27:08 +0100 |
commit | 52a5d0d27f2557db99fc5435fbd7783b649cb9b2 (patch) | |
tree | 99e4029f3e746bf086b3a568c06460719852f627 /scripts/download.pl | |
parent | b0cb305236524095bfd899449b0ad8eb821cb3bb (diff) | |
download | upstream-52a5d0d27f2557db99fc5435fbd7783b649cb9b2.tar.gz upstream-52a5d0d27f2557db99fc5435fbd7783b649cb9b2.tar.bz2 upstream-52a5d0d27f2557db99fc5435fbd7783b649cb9b2.zip |
download.pl: properly cleanup intermediate .hash file
It seems like after a build the /dl dir seems to now contain a .hash
file for each source file due to inproper cleanup so fix it by removing
those intermediate files before leaving the download action.
Fixes: 4e19cbc55335 ("download: handle possibly invalid local tarballs")
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'scripts/download.pl')
-rwxr-xr-x | scripts/download.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/download.pl b/scripts/download.pl index 2d87f47f84..84d10dbe5f 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -272,11 +272,11 @@ if (-f "$target/$filename") { $sum =~ /^(\w+)\s*/ or die "Could not generate file hash\n"; $sum = $1; + cleanup(); exit 0 if $sum eq $file_hash; die "Hash of the local file $filename does not match (file: $sum, requested: $file_hash) - deleting download.\n"; unlink "$target/$filename"; - cleanup(); }; } |