diff --git a/PVE/Storage.pm b/PVE/Storage.pm index dee0d59..0452a2d 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -683,9 +683,9 @@ sub template_list { $info = { volid => "$sid:iso/$1", format => 'iso' }; } elsif ($tt eq 'vztmpl') { - next if $fn !~ m!/([^/]+\.tar\.gz)$!; + next if $fn !~ m!/([^/]+\.tar\.([gx]z))$!; - $info = { volid => "$sid:vztmpl/$1", format => 'tgz' }; + $info = { volid => "$sid:vztmpl/$1", format => "t$2" }; } elsif ($tt eq 'backup') { next if $fn !~ m!/([^/]+\.(tar|tar\.gz|tar\.lzo|tgz|vma|vma\.gz|vma\.lzo))$!; diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm index 092cf9a..310a658 100644 --- a/PVE/Storage/Plugin.pm +++ b/PVE/Storage/Plugin.pm @@ -364,7 +364,7 @@ sub parse_volname { return ('images', $name, $vmid, undef, undef, $isBase); } elsif ($volname =~ m!^iso/([^/]+\.[Ii][Ss][Oo])$!) { return ('iso', $1); - } elsif ($volname =~ m!^vztmpl/([^/]+\.tar\.gz)$!) { + } elsif ($volname =~ m!^vztmpl/([^/]+\.tar\.[gx]z)$!) { return ('vztmpl', $1); } elsif ($volname =~ m!^rootdir/(\d+)$!) { return ('rootdir', $1, $1);