5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-03 01:18:01 +03:00

ovf import: disks: mave ovf namespace in resource path optional

Some OVFs like for example the one from the GNS3 OVA doesn't has that
namespace/prefix, and does't really hurts us to make it optional as
long as the rest is correct.

Brings us nearer to have working disks with GNS3.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2024-11-18 19:56:49 +01:00
parent 426b0cc3aa
commit f2a6bd2788

View File

@ -267,7 +267,7 @@ sub parse_ovf {
# RFC 3986 "2.3. Unreserved Characters"
my $valid_uripath_chars = qr/[[:alnum:]]|[\-\._~]/;
if ($host_resource =~ m|^ovf:/(${valid_uripath_chars}+)/(${valid_uripath_chars}+)$|) {
if ($host_resource =~ m|^(?:ovf:)?/(${valid_uripath_chars}+)/(${valid_uripath_chars}+)$|) {
$disk_section_path = $1;
$disk_id = $2;
} else {