Fix #1424: allow tar.xz templates upload

This commit is contained in:
Emmanuel Kasper
2017-06-22 10:42:39 +02:00
committed by Wolfgang Bumiller
parent 88a5ed1f11
commit 030f6e1a97

View File

@ -353,8 +353,8 @@ __PACKAGE__->register_method ({
}
$path = PVE::Storage::get_iso_dir($cfg, $param->{storage});
} elsif ($content eq 'vztmpl') {
if ($filename !~ m![^/]+\.tar\.gz$!) {
raise_param_exc({ filename => "missing '.tar.gz' extension" });
if ($filename !~ m![^/]+\.tar\.[gx]z$!) {
raise_param_exc({ filename => "missing '.tar.gz' or '.tar.xz' extension" });
}
$path = PVE::Storage::get_vztmpl_dir($cfg, $param->{storage});
} else {