mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-03 01:18:01 +03:00
file_size_info: add missing format
parameters
these calls would print spurious warnings otherwise. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
a8d246e784
commit
f1ea2c5c89
@ -36,6 +36,8 @@ sub extract_disk_from_import_file {
|
||||
die "cannot extract $volid - invalid volname $volname\n";
|
||||
}
|
||||
|
||||
die "cannot determine format of '$volid'\n" if !$inner_fmt;
|
||||
|
||||
my $ova_path = PVE::Storage::path($cfg, $archive_volid);
|
||||
|
||||
my $tmpdir = PVE::Storage::get_image_dir($cfg, $target_storeid, $vmid);
|
||||
@ -63,7 +65,7 @@ sub extract_disk_from_import_file {
|
||||
}
|
||||
|
||||
# check potentially untrusted image file!
|
||||
PVE::Storage::file_size_info($source_path, undef, undef, 1);
|
||||
PVE::Storage::file_size_info($source_path, undef, $inner_fmt, 1);
|
||||
|
||||
# create temporary 1M image that will get overwritten by the rename
|
||||
# to reserve the filename and take care of locking
|
||||
|
@ -300,7 +300,7 @@ sub volume_size_info {
|
||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||
return $plugin->volume_size_info($scfg, $storeid, $volname, $timeout);
|
||||
} elsif ($volid =~ m|^(/.+)$| && -e $volid) {
|
||||
return file_size_info($volid, $timeout);
|
||||
return file_size_info($volid, $timeout, 'auto-detect');
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ sub volume_size_info {
|
||||
return 0 if $volname =~ /\.vmx$/;
|
||||
|
||||
my $filename = $class->path($scfg, $volname, $storeid, undef);
|
||||
return PVE::Storage::Plugin::file_size_info($filename, $timeout);
|
||||
return PVE::Storage::Plugin::file_size_info($filename, $timeout, 'auto-detect');
|
||||
}
|
||||
|
||||
sub volume_snapshot {
|
||||
|
Loading…
Reference in New Issue
Block a user