]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
Fix: backup: relax file name matching regex
[pve-storage.git] / PVE / Storage.pm
index 87550b14360eade1ac15a5de96272b3e64ab2e3a..2a8deaf29dd446832d19783d08b778ed8baa90cb 100755 (executable)
@@ -1394,9 +1394,13 @@ sub archive_info {
     my $info;
 
     my $volid = basename($archive);
-    if ($volid =~ /vzdump-(lxc|openvz|qemu)-\d+-(?:\d{4})_(?:\d{2})_(?:\d{2})-(?:\d{2})_(?:\d{2})_(?:\d{2})\.(tgz$|tar|vma)(?:\.(${\PVE::Storage::Plugin::COMPRESSOR_RE}))?$/) {
-       $info = decompressor_info($2, $3);
-       $info->{type} = $1;
+    if ($volid =~ /\.(tgz$|tar|vma)(?:\.(${\PVE::Storage::Plugin::COMPRESSOR_RE}))?$/) {
+       $info = decompressor_info($1, $2);
+       $info->{type} = 'unknown';
+
+       if ($volid =~ /vzdump-(lxc|openvz|qemu)-\d+-(?:\d{4})_(?:\d{2})_(?:\d{2})-(?:\d{2})_(?:\d{2})_(?:\d{2})/) {
+           $info->{type} = $1;
+       }
     } else {
        die "ERROR: couldn't determine format and compression type\n";
     }