allow templates using .xz compression
This commit is contained in:
@ -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))$!;
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user