]> git.proxmox.com Git - pve-storage.git/commitdiff
archive info: include archive name in error message
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 15 May 2020 17:13:37 +0000 (19:13 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 15 May 2020 17:13:39 +0000 (19:13 +0200)
so that we have some context if users report issues with it..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage.pm
test/archive_info_test.pm

index b01211d2d53122394ef6261948596b890c0e18d3..df8d6fe0761ebca270ac4af0035e1512a8e4bf02 100755 (executable)
@@ -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;
index c0343aff4a4d9d38cfcbe29aec7dbdd0f1d2ed72..dd4a635883be164dde369cfe1029b3d6d20bc589 100644 (file)
@@ -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",
        };
     }
 }