[pve-devel] [PATCH] Fix #1424: allow tar.xz templates upload
Emmanuel Kasper
e.kasper at proxmox.com
Thu Jun 22 10:42:39 CEST 2017
---
PVE/API2/Storage/Status.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm
index 81ba67f..c6e3b1a 100644
--- a/PVE/API2/Storage/Status.pm
+++ b/PVE/API2/Storage/Status.pm
@@ -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 {
--
2.11.0
More information about the pve-devel
mailing list