]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
fix #2216: Allow .img files in 'iso' type storages
[pve-storage.git] / PVE / Storage.pm
index 755eca83d4e3a5b1979813c8e5fd960be27c20e4..08b6e142e343d4f40eb5b0fd33e8f6f3f12ac24c 100755 (executable)
@@ -99,6 +99,8 @@ PVE::Storage::Plugin->init();
 
 my $UDEVADM = '/sbin/udevadm';
 
+my $iso_extension_re = qr/\.(?:[Ii][Ss][Oo]|[Ii][Mm][Gg])/;
+
 #  PVE::Storage utility functions
 
 sub config {
@@ -501,7 +503,7 @@ sub path_to_volume_id {
                    return ('images', $info->{volid});
                }
            }
-       } elsif ($path =~ m!^$isodir/([^/]+\.[Ii][Ss][Oo])$!) {
+       } elsif ($path =~ m!^$isodir/([^/]+$iso_extension_re)$!) {
            my $name = $1;
            return ('iso', "$sid:iso/$name");
        } elsif ($path =~ m!^$tmpldir/([^/]+\.tar\.gz)$!) {