From b1e662bd480241ea914f0f3d6bd174d9ffd03f5f Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 6 Dec 2017 11:40:44 -0800 Subject: Fix cab creation using explicit Media element --- src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs index f426b96d..1f2cee74 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs @@ -58,7 +58,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind var mediaTemplateTable = this.Section.Tuples.OfType().ToList(); // If both tables are authored, it is an error. - if ((mediaTemplateTable != null && mediaTemplateTable.Count > 0) && (mediaTable != null && mediaTable.Count > 1)) + if (mediaTemplateTable.Count > 0 && mediaTable.Count > 1) { throw new WixException(WixErrors.MediaTableCollision(null)); } @@ -73,7 +73,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind filesByCabinetMedia.Add(mergeModuleMediaRow, new List(this.FileFacades)); } - else if (null == mediaTemplateTable) + else if (mediaTemplateTable.Count == 0) { this.ManuallyAssignFiles(mediaTable, this.FileFacades, filesByCabinetMedia, mediaRows, uncompressedFiles); } @@ -266,8 +266,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind // When building a product, if the current file is not to be compressed or if // the package set not to be compressed, don't cab it. if (SectionType.Product == this.Section.Type && - (!facade.File.Compressed.Value || - (!facade.File.Compressed.HasValue && !this.FilesCompressed))) + ((!facade.File.Compressed.HasValue && !this.FilesCompressed) || + (facade.File.Compressed.HasValue && !facade.File.Compressed.Value))) { uncompressedFiles.Add(facade); } -- cgit v1.2.3-55-g6feb