]> git.proxmox.com Git - pve-storage.git/commitdiff
allow multiple content types
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 20 Oct 2011 06:02:52 +0000 (08:02 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 20 Oct 2011 06:02:52 +0000 (08:02 +0200)
PVE/Storage.pm

index ec3f787b4a422dc6b9d1c6c11be7c7f06f09c415..225968a27bbfa67b9cd49fb8f270e16fec5565d7 100755 (executable)
@@ -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;
 }