]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/API2/Storage/Status.pm
fix #2216: Allow .img files in 'iso' type storages
[pve-storage.git] / PVE / API2 / Storage / Status.pm
index ce7e040b27fe62fefa94857ac91da76e8977867c..91946acf1473fb4a1507ace982e978338342a69a 100644 (file)
@@ -408,8 +408,8 @@ __PACKAGE__->register_method ({
        my $path;
 
        if ($content eq 'iso') {
-           if ($filename !~ m![^/]+\.[Ii][Ss][Oo]$!) {
-               raise_param_exc({ filename => "missing '.iso' extension" });
+           if ($filename !~ m![^/]+$PVE::Storage::iso_extension_re$!) {
+               raise_param_exc({ filename => "missing '.iso' or '.img' extension" });
            }
            $path = PVE::Storage::get_iso_dir($cfg, $param->{storage});
        } elsif ($content eq 'vztmpl') {