mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-02 23:16:05 +00:00
api: create disks: import from absolute path: adapt to new parameter order for file_size_info()
Keep format auto-detection for backwards compatibility. Only root is allowed to use such images as source images and the untrusted checks will be done here. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
ccc3bae30a
commit
da2cf5806b
@ -499,7 +499,8 @@ my sub create_disks : prototype($$$$$$$$$$$) {
|
||||
} else {
|
||||
$source = PVE::Storage::abs_filesystem_path($storecfg, $source, 1);
|
||||
# check potentially untrusted image file!
|
||||
($size, my $source_format) = PVE::Storage::file_size_info($source, undef, 1);
|
||||
($size, my $source_format) =
|
||||
PVE::Storage::file_size_info($source, undef, 'auto-detect', 1);
|
||||
die "could not get file size of $source\n" if !$size;
|
||||
|
||||
if ($live_import && $ds ne 'efidisk0') {
|
||||
|
Loading…
Reference in New Issue
Block a user