]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/Plugin.pm
config: prevent empty content list when content type 'none' is not supported
[pve-storage.git] / PVE / Storage / Plugin.pm
index 948002e306864bd5c8e2619b79389559ed720f1c..d330845fd1622fbe0347b540be1666f24f7074fd 100644 (file)
@@ -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];