From 03c487e5537117acecd38d4d12e387e046d0f0ea Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Fri, 18 Jun 2021 12:59:36 +0200 Subject: [PATCH] config: prevent empty content list when content type 'none' is not supported Signed-off-by: Fabian Ebner --- PVE/Storage/Plugin.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm index 948002e..d330845 100644 --- a/PVE/Storage/Plugin.pm +++ b/PVE/Storage/Plugin.pm @@ -345,6 +345,10 @@ sub decode_value { die "unable to combine 'none' with other content types\n"; } + if (scalar(keys $res->%*) == 0 && !$valid_content->{none}) { + die "storage does not support content type 'none'\n"; + } + return $res; } elsif ($key eq 'format') { my $valid_formats = $def->{format}->[0];