[pve-devel] r5657 - in pve-storage/pve2: . PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Tue Mar 8 08:35:02 CET 2011


Author: dietmar
Date: 2011-03-08 08:35:02 +0100 (Tue, 08 Mar 2011)
New Revision: 5657

Modified:
   pve-storage/pve2/ChangeLog
   pve-storage/pve2/PVE/Storage.pm
Log:
avoid to create empty
	content config


Modified: pve-storage/pve2/ChangeLog
===================================================================
--- pve-storage/pve2/ChangeLog	2011-03-08 06:35:40 UTC (rev 5656)
+++ pve-storage/pve2/ChangeLog	2011-03-08 07:35:02 UTC (rev 5657)
@@ -1,3 +1,8 @@
+2011-03-08  Proxmox Support Team  <support at proxmox.com>
+
+	* PVE/Storage.pm (__activate_storage_full): avoid to create empty
+	content config
+
 2011-02-11  Proxmox Support Team  <support at proxmox.com>
 
 	* PVE/API2/*: cleanup API Object hierarchiy

Modified: pve-storage/pve2/PVE/Storage.pm
===================================================================
--- pve-storage/pve2/PVE/Storage.pm	2011-03-08 06:35:40 UTC (rev 5656)
+++ pve-storage/pve2/PVE/Storage.pm	2011-03-08 07:35:02 UTC (rev 5657)
@@ -1786,12 +1786,14 @@
 	my $isodir = get_iso_dir ($cfg, $storeid);
 	my $tmpldir = get_vztmpl_dir ($cfg, $storeid);
 
-	mkpath $imagedir if $scfg->{content}->{images} &&
-	    $imagedir ne $path;
-	mkpath $isodir if $scfg->{content}->{iso} &&
-	    $isodir ne $path;
-	mkpath $tmpldir if $scfg->{content}->{vztmpl} &&
-	    $tmpldir ne $path;
+	if (defined($scfg->{content})) {
+	    mkpath $imagedir if $scfg->{content}->{images} &&
+		$imagedir ne $path;
+	    mkpath $isodir if $scfg->{content}->{iso} &&
+		$isodir ne $path;
+	    mkpath $tmpldir if $scfg->{content}->{vztmpl} &&
+		$tmpldir ne $path;
+	}
 
     } elsif ($type eq 'lvm') {
 




More information about the pve-devel mailing list