archive_info: relax custom name handling
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 <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
b1ddc54a93
commit
28be2a431b
@ -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";
|
||||
|
||||
Reference in New Issue
Block a user