[pve-devel] [PATCH] add check if format is defined to avoid warning
Wolfgang Link
w.link at proxmox.com
Mon Jun 27 12:24:26 CEST 2016
---
PVE/Storage/Plugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index 002b265..7461452 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -597,7 +597,7 @@ sub free_image {
my $path = $class->filesystem_path($scfg, $volname);
- if ($format eq 'subvol') {
+ if (defined($format) && $format eq 'subvol') {
File::Path::remove_tree($path);
} else {
--
2.1.4
More information about the pve-devel
mailing list