add check if format is defined to avoid warning

This commit is contained in:
Wolfgang Link
2016-06-27 12:24:26 +02:00
committed by Dietmar Maurer
parent d2c0bb589b
commit 4a7d222204

View File

@ -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 {