]> git.proxmox.com Git - pve-storage.git/commitdiff
archive_info: relax custom name handling
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 8 Jul 2020 10:05:02 +0000 (12:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 Jul 2020 13:26:19 +0000 (15:26 +0200)
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>
PVE/Storage.pm

index ffa14844fa3262d7f38ba5f323fca3f2fbfcb488..edf9a2ecd6651baf89839d8d78d4c411f4fba59b 100755 (executable)
@@ -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";