mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-23 07:03:44 +00:00
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: 4e19cbc553
("download: handle possibly invalid local tarballs")
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
parent
b0cb305236
commit
52a5d0d27f
@ -272,11 +272,11 @@ if (-f "$target/$filename") {
|
|||||||
$sum =~ /^(\w+)\s*/ or die "Could not generate file hash\n";
|
$sum =~ /^(\w+)\s*/ or die "Could not generate file hash\n";
|
||||||
$sum = $1;
|
$sum = $1;
|
||||||
|
|
||||||
|
cleanup();
|
||||||
exit 0 if $sum eq $file_hash;
|
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";
|
die "Hash of the local file $filename does not match (file: $sum, requested: $file_hash) - deleting download.\n";
|
||||||
unlink "$target/$filename";
|
unlink "$target/$filename";
|
||||||
cleanup();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user