From a12671ae979148259090005591ea0f945bbe8d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 18 Apr 2024 15:10:46 +0200 Subject: [PATCH] lvmthin: import: improve readability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the nested call combined with the long parameter list is not very nice to format/read, let's split it.. Signed-off-by: Fabian Grünbichler --- src/PVE/Storage/LvmThinPlugin.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PVE/Storage/LvmThinPlugin.pm b/src/PVE/Storage/LvmThinPlugin.pm index 96f619b..4b23623 100644 --- a/src/PVE/Storage/LvmThinPlugin.pm +++ b/src/PVE/Storage/LvmThinPlugin.pm @@ -415,7 +415,7 @@ sub volume_import { $tempname =~ s/base/vm/; } - ($storeid,my $newname) = PVE::Storage::parse_volume_id($class->SUPER::volume_import( + my $newvolid = $class->SUPER::volume_import( $scfg, $storeid, $fh, @@ -425,7 +425,8 @@ sub volume_import { $base_snapshot, $with_snapshots, $allow_rename - )); + ); + ($storeid,my $newname) = PVE::Storage::parse_volume_id($newvolid); $volname = $class->create_base($storeid, $scfg, $newname); }