From 0d1851c79901ba6ddbba9bb63f758760fe5be994 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 5 Jan 2021 15:13:37 -0800 Subject: Fix handling of duplicate directories --- .../Link/FindEntrySectionAndLoadSymbolsCommand.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs') diff --git a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs index 1c2ca8eb..a4b2bee3 100644 --- a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs +++ b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs @@ -38,10 +38,17 @@ namespace WixToolset.Core.Link /// public IEnumerable PossibleConflicts { get; private set; } + /// + /// Gets the collection of redundant symbols that should not be included + /// in the final output. + /// + public ISet RedundantSymbols { get; private set; } + public void Execute() { var symbolsByName = new Dictionary(); var possibleConflicts = new HashSet(); + var redundantSymbols = new HashSet(); if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) { @@ -91,13 +98,13 @@ namespace WixToolset.Core.Link // Ensure identical symbol's symbol is marked redundant to ensure (should the symbol be // referenced into the final output) it will not add duplicate primary keys during // the .IDT importing. - //symbol.Row.Redundant = true; - TODO: remove this existingSymbol.AddRedundant(symbolWithSection); + redundantSymbols.Add(symbolWithSection.Symbol); } else { existingSymbol.AddPossibleConflict(symbolWithSection); - possibleConflicts.Add(existingSymbol); + possibleConflicts.Add(symbolWithSection); } } } @@ -105,6 +112,7 @@ namespace WixToolset.Core.Link this.SymbolsByName = symbolsByName; this.PossibleConflicts = possibleConflicts; + this.RedundantSymbols = redundantSymbols; } } } -- cgit v1.2.3-55-g6feb