]> git.proxmox.com Git - pve-storage.git/commitdiff
fix 2317: list images on 'rootdir' only storages
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 6 Aug 2019 07:23:19 +0000 (09:23 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 6 Aug 2019 11:39:43 +0000 (13:39 +0200)
plugins can still override list_volumes if they want separate methods to
list rootdir and images content.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/Storage.pm
PVE/Storage/Plugin.pm

index 7376dbf72348c2bbcd64d895363ac8097880985d..755eca83d4e3a5b1979813c8e5fd960be27c20e4 100755 (executable)
@@ -845,7 +845,7 @@ sub template_list {
 sub volume_list {
     my ($cfg, $storeid, $vmid, $content) = @_;
 
-    my @ctypes = qw(images vztmpl iso backup snippets);
+    my @ctypes = qw(rootdir images vztmpl iso backup snippets);
 
     my $cts = $content ? [ $content ] : [ @ctypes ];
 
index 08ec7494fc1177ed6e8d19c5414a9fa308c4726f..27f832fc161a8da761fe2741fdf0d5280b6c6084 100644 (file)
@@ -954,7 +954,7 @@ sub list_volumes {
     foreach my $ct (@$content_types) {
        my $data;
 
-       if ($ct eq 'images') {
+       if ($ct eq 'images' || $ct eq 'rootdir') {
            $data = $class->list_images($storeid, $scfg, $vmid);
        } elsif ($scfg->{path}) {
            my $path = $class->get_subdir($scfg, $ct);