fix 2317: list images on 'rootdir' only storages

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>
This commit is contained in:
Fabian Grünbichler
2019-08-06 09:23:19 +02:00
committed by Wolfgang Bumiller
parent 4dfc2ff21e
commit be78543909
2 changed files with 2 additions and 2 deletions

View File

@ -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 ];

View 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);