From: Thomas Lamprecht Date: Fri, 15 May 2020 17:13:37 +0000 (+0200) Subject: archive info: include archive name in error message X-Git-Url: https://git.proxmox.com/?p=pve-storage.git;a=commitdiff_plain;h=bf5af0fbf5de0707ac68161eceb3bccfdd39d4b2 archive info: include archive name in error message so that we have some context if users report issues with it.. Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/Storage.pm b/PVE/Storage.pm index b01211d..df8d6fe 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -1402,7 +1402,7 @@ sub archive_info { $info->{type} = $1; } } else { - die "ERROR: couldn't determine format and compression type\n"; + die "ERROR: couldn't determine archive info from '$archive'\n"; } return $info; diff --git a/test/archive_info_test.pm b/test/archive_info_test.pm index c0343af..dd4a635 100644 --- a/test/archive_info_test.pm +++ b/test/archive_info_test.pm @@ -100,10 +100,11 @@ my $non_bkp_suffix = { for my $virt (sort keys %$non_bkp_suffix) { my $suffix = $non_bkp_suffix->{$virt}; for my $s (@$suffix) { + my $archive = "backup/vzdump-$virt-$vmid-2020_03_30-21_12_40.$s"; push @$tests, { description => "Failed match: Backup archive, $virt, $s", - archive => "backup/vzdump-$virt-$vmid-2020_03_30-21_12_40.$s", - expected => "ERROR: couldn't determine format and compression type\n", + archive => $archive, + expected => "ERROR: couldn't determine archive info from '$archive'\n", }; } }