CA-110209: Install Update Wizard: If the patch is already uploaded, then we use it and ignore the "already exists" error.

This commit is contained in:
Mihaela Stoica 2014-04-30 13:31:39 +01:00
parent ff2ef9af0c
commit 6a6be458fd

View File

@ -129,13 +129,10 @@ namespace XenAdmin.Actions
catch (Failure f)
{
// Need to check if the patch already exists.
// If it does, and we're upload multiple patches
// (ie from the wizard) then we don't care about
// throwing the error
// If it does then we use it and ignore the PATCH_ALREADY_EXISTS error (CA-110209).
if (f.ErrorDescription != null
&& f.ErrorDescription.Count > 1
&& f.ErrorDescription[0] == XenAPI.Failure.PATCH_ALREADY_EXISTS
&& embeddedHosts.Count + retailHosts.Count > 1)
&& f.ErrorDescription[0] == XenAPI.Failure.PATCH_ALREADY_EXISTS)
{
string uuid = f.ErrorDescription[1];
Session session = host.Connection.DuplicateSession();