mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-21 07:49:32 +01:00
Prevent null reference when importing OVF files from web server
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
parent
7d9bbbc68b
commit
46b83bf3a4
@ -754,6 +754,8 @@ namespace XenAdmin.Wizards.ImportWizard
|
|||||||
int index = _uri.OriginalString.LastIndexOf('/') + 1;
|
int index = _uri.OriginalString.LastIndexOf('/') + 1;
|
||||||
var remoteDir = _uri.OriginalString.Substring(0, index);
|
var remoteDir = _uri.OriginalString.Substring(0, index);
|
||||||
|
|
||||||
|
if (envType.References.File != null)
|
||||||
|
{
|
||||||
foreach (var file in envType.References.File)
|
foreach (var file in envType.References.File)
|
||||||
{
|
{
|
||||||
var remoteUri = new Uri(remoteDir + file.href);
|
var remoteUri = new Uri(remoteDir + file.href);
|
||||||
@ -762,6 +764,7 @@ namespace XenAdmin.Wizards.ImportWizard
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_filesToDownload.Count == 0)
|
if (_filesToDownload.Count == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user