mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-14 08:59:10 +00:00
importovf: die with error when disk file is missing
Also add missing '\n' at the end of error messages Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
afc910a829
commit
48caa553ab
@ -213,12 +213,16 @@ ovf:Item[rasd:InstanceID='%s']/rasd:ResourceType", $controller_id);
|
||||
my $ovf_dir = realpath(dirname(File::Spec->rel2abs($ovf)));
|
||||
my $backing_file_path = realpath(join ('/', $ovf_dir, $filepath));
|
||||
if ($backing_file_path !~ /^\Q${ovf_dir}\E/) {
|
||||
die "error parsing $filepath, are you using a symlink ?";
|
||||
die "error parsing $filepath, are you using a symlink ?\n";
|
||||
}
|
||||
|
||||
if (!-e $backing_file_path) {
|
||||
die "error parsing $filepath, file seems not to exist at $backing_file_path\n";
|
||||
}
|
||||
|
||||
my $virtual_size;
|
||||
if ( !($virtual_size = PVE::Storage::file_size_info($backing_file_path)) ) {
|
||||
die "error parsing $backing_file_path, size seems to be $virtual_size";
|
||||
die "error parsing $backing_file_path, size seems to be $virtual_size\n";
|
||||
}
|
||||
|
||||
$pve_disk = {
|
||||
|
Loading…
Reference in New Issue
Block a user