From 225885ac45c288156119fb139052cdd712b580ea Mon Sep 17 00:00:00 2001 From: Gabor Apati-Nagy Date: Wed, 19 Oct 2016 13:39:14 +0100 Subject: [PATCH] CA-225731: XenCenter: Find the ISO update in the zip file defined in CFU Always define the extension to search for Signed-off-by: Gabor Apati-Nagy --- .../PatchingWizard/PlanActions/DownloadPatchPlanAction.cs | 4 +--- .../Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/XenAdmin/Wizards/PatchingWizard/PlanActions/DownloadPatchPlanAction.cs b/XenAdmin/Wizards/PatchingWizard/PlanActions/DownloadPatchPlanAction.cs index 312d0f688..707cdd9fe 100644 --- a/XenAdmin/Wizards/PatchingWizard/PlanActions/DownloadPatchPlanAction.cs +++ b/XenAdmin/Wizards/PatchingWizard/PlanActions/DownloadPatchPlanAction.cs @@ -89,9 +89,7 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions Uri address = new Uri(patchUri); tempFileName = Path.GetTempFileName(); - bool isIso = patchUri.ToLowerInvariant().EndsWith("iso"); - - var downloadAction = new DownloadAndUnzipXenServerPatchAction(patch.Name, address, tempFileName); + var downloadAction = new DownloadAndUnzipXenServerPatchAction(patch.Name, address, tempFileName, Helpers.ElyOrGreater(Connection) ? "iso" : Branding.Update); if (downloadAction != null) { diff --git a/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs b/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs index d0b8c1aa1..b67fdde16 100644 --- a/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs +++ b/XenModel/Actions/Updates/DownloadAndUnzipXenServerPatchAction.cs @@ -59,7 +59,7 @@ namespace XenAdmin.Actions } public DownloadAndUnzipXenServerPatchAction(string patchName, Uri uri, string outputFileName) - : this(patchName, uri, outputFileName, null) + : this(patchName, uri, outputFileName, InvisibleMessages.XEN_UPDATE) { } public DownloadAndUnzipXenServerPatchAction(string patchName, Uri uri, string outputFileName, string updateFileExtension) @@ -125,8 +125,7 @@ namespace XenAdmin.Actions { string currentExtension = Path.GetExtension(iterator.CurrentFileName()); - if (!string.IsNullOrEmpty(updateFileExtension) && currentExtension == "." + updateFileExtension - || currentExtension == ".iso" || currentExtension == ".xsupdate") + if (!string.IsNullOrEmpty(updateFileExtension) && currentExtension == "." + updateFileExtension) { string path = Path.Combine(Path.GetDirectoryName(outFileName), iterator.CurrentFileName());