esxi: fix return value of volume_size_info for vmx volumes
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.gruenbichler@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
@ -535,7 +535,9 @@ sub volume_resize {
|
|||||||
sub volume_size_info {
|
sub volume_size_info {
|
||||||
my ($class, $scfg, $storeid, $volname, $timeout) = @_;
|
my ($class, $scfg, $storeid, $volname, $timeout) = @_;
|
||||||
|
|
||||||
return 0 if $volname =~ /\.vmx$/;
|
if ($volname =~ /\.vmx$/) {
|
||||||
|
return wantarray ? (0, 'vmx') : 0;
|
||||||
|
}
|
||||||
|
|
||||||
my $filename = $class->path($scfg, $volname, $storeid, undef);
|
my $filename = $class->path($scfg, $volname, $storeid, undef);
|
||||||
return PVE::Storage::Plugin::file_size_info($filename, $timeout, 'auto-detect');
|
return PVE::Storage::Plugin::file_size_info($filename, $timeout, 'auto-detect');
|
||||||
|
|||||||
Reference in New Issue
Block a user