the top-level error handling ensures the temporary downloaded file gets
removed in case of an error, so there is no need to also handle that when
decompression fails..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
die "cant open temporary file $tmp_decomp for decompresson: $!\n";
}
print "decompressing $tmp_download to $tmp_decomp\n";
- eval { run_command($cmd, output => '>&'.fileno($fh)); };
- my $err = $@;
+ run_command($cmd, output => '>&'.fileno($fh));
unlink $tmp_download;
- die "$err\n" if $err;
rename($tmp_decomp, $dest) or die "unable to rename temporary file: $!\n";
} else {
rename($tmp_download, $dest) or die "unable to rename temporary file: $!\n";