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,11 +754,14 @@ 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);
|
||||||
|
|
||||||
foreach (var file in envType.References.File)
|
if (envType.References.File != null)
|
||||||
{
|
{
|
||||||
var remoteUri = new Uri(remoteDir + file.href);
|
foreach (var file in envType.References.File)
|
||||||
var localPath = Path.Combine(_downloadFolder, file.href);
|
{
|
||||||
_filesToDownload.Enqueue(new ApplianceFile(remoteUri, localPath));
|
var remoteUri = new Uri(remoteDir + file.href);
|
||||||
|
var localPath = Path.Combine(_downloadFolder, file.href);
|
||||||
|
_filesToDownload.Enqueue(new ApplianceFile(remoteUri, localPath));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user