From 28be2a431bed596824cbe8f243a4da0515aa69db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 8 Jul 2020 12:05:02 +0200 Subject: [PATCH] archive_info: relax custom name handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we already differentiate between standard and non-standard names anyway and don't detect and return the VMID in the latter case anyway. drop it from the RE as well to allow names like 'vzdump-qemu-template.vma.lzo' without the need for a fake VMID. Signed-off-by: Fabian Grünbichler --- PVE/Storage.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index ffa1484..edf9a2e 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -1393,7 +1393,7 @@ sub archive_info { my $info; my $volid = basename($archive); - if ($volid =~ /^(vzdump-(lxc|openvz|qemu)-\d+-.+\.(tgz$|tar|vma)(?:\.(${\PVE::Storage::Plugin::COMPRESSOR_RE}))?)$/) { + if ($volid =~ /^(vzdump-(lxc|openvz|qemu)-.+\.(tgz$|tar|vma)(?:\.(${\PVE::Storage::Plugin::COMPRESSOR_RE}))?)$/) { my $filename = "$1"; # untaint my ($type, $format, $comp) = ($2, $3, $4); my $format_re = defined($comp) ? "$format.$comp" : "$format";