Am 10.12.24 um 13:17 schrieb Fabian Grünbichler: > in case of an array context, it should also return the format, else a caller > might assume it failed. > > Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> > --- > v2: fix return value ordering, thanks Fiona! > > src/PVE/Storage/ESXiPlugin.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm > index 37f9e75..70735f9 100644 > --- a/src/PVE/Storage/ESXiPlugin.pm > +++ b/src/PVE/Storage/ESXiPlugin.pm > @@ -535,7 +535,9 @@ sub volume_resize { > sub volume_size_info { > my ($class, $scfg, $storeid, $volname, $timeout) = @_; > > - return 0 if $volname =~ /\.vmx$/; > + if ($volname =~ /\.vmx$/) { > + return wantarray ? (0, 'vmx') : 0 ;
Style nit: space before semicolon > + } > > my $filename = $class->path($scfg, $volname, $storeid, undef); > return PVE::Storage::Plugin::file_size_info($filename, $timeout, > 'auto-detect'); _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel