From 6a4d7398b3eda476eea52da1122db62d983f4d5f Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 20 Oct 2011 08:02:52 +0200 Subject: [PATCH] allow multiple content types --- PVE/Storage.pm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index ec3f787..225968a 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -397,12 +397,9 @@ sub check_type { $res->{$c} = 1; } - # only local storage may have several content types - if ($res->{none} || !($storeid && $storeid eq 'local')) { - if (scalar (keys %$res) > 1) { + if ($res->{none} && scalar (keys %$res) > 1) { return undef if $noerr; - die "storage does not support multiple content types\n"; - } + die "unable to combine 'none' with other content types\n"; } return $res; @@ -733,7 +730,7 @@ sub get_iso_dir { my ($cfg, $storeid) = @_; my $isodir = $cfg->{ids}->{$storeid}->{path}; - $isodir .= '/template/iso' if $storeid eq 'local'; + $isodir .= '/template/iso'; return $isodir; } @@ -742,7 +739,7 @@ sub get_vztmpl_dir { my ($cfg, $storeid) = @_; my $tmpldir = $cfg->{ids}->{$storeid}->{path}; - $tmpldir .= '/template/cache' if $storeid eq 'local'; + $tmpldir .= '/template/cache'; return $tmpldir; } @@ -751,7 +748,7 @@ sub get_backup_dir { my ($cfg, $storeid) = @_; my $dir = $cfg->{ids}->{$storeid}->{path}; - $dir .= '/dump' if $storeid eq 'local'; + $dir .= '/dump'; return $dir; }