restore_tar_archive: cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-11-08 15:43:14 +01:00
parent a2f50f0172
commit 7dc7f315f3

View File

@ -6673,14 +6673,9 @@ sub restore_tar_archive {
$srcfd->close();
$outfd->close();
};
my $err = $@;
if ($err) {
if (my $err = $@) {
unlink $tmpfn;
tar_restore_cleanup($storecfg, "$tmpdir/qmrestore.stat") if !$opts->{info};
die $err;
}