diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-01-05 15:13:37 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-01-05 23:18:34 -0800 |
| commit | 0d1851c79901ba6ddbba9bb63f758760fe5be994 (patch) | |
| tree | 2ccb45459fe4290e9c3fb4ad698c20f9cd55203d /src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs | |
| parent | b00c72ed0ef19d2e46f60361fa06821b0bd5ec94 (diff) | |
| download | wix-0d1851c79901ba6ddbba9bb63f758760fe5be994.tar.gz wix-0d1851c79901ba6ddbba9bb63f758760fe5be994.tar.bz2 wix-0d1851c79901ba6ddbba9bb63f758760fe5be994.zip | |
Fix handling of duplicate directories
Diffstat (limited to 'src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs | 12 |
1 files changed, 10 insertions, 2 deletions
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 | |||
| 38 | /// </summary> | 38 | /// </summary> |
| 39 | public IEnumerable<SymbolWithSection> PossibleConflicts { get; private set; } | 39 | public IEnumerable<SymbolWithSection> PossibleConflicts { get; private set; } |
| 40 | 40 | ||
| 41 | /// <summary> | ||
| 42 | /// Gets the collection of redundant symbols that should not be included | ||
| 43 | /// in the final output. | ||
| 44 | /// </summary> | ||
| 45 | public ISet<IntermediateSymbol> RedundantSymbols { get; private set; } | ||
| 46 | |||
| 41 | public void Execute() | 47 | public void Execute() |
| 42 | { | 48 | { |
| 43 | var symbolsByName = new Dictionary<string, SymbolWithSection>(); | 49 | var symbolsByName = new Dictionary<string, SymbolWithSection>(); |
| 44 | var possibleConflicts = new HashSet<SymbolWithSection>(); | 50 | var possibleConflicts = new HashSet<SymbolWithSection>(); |
| 51 | var redundantSymbols = new HashSet<IntermediateSymbol>(); | ||
| 45 | 52 | ||
| 46 | if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) | 53 | if (!Enum.TryParse(this.ExpectedOutputType.ToString(), out SectionType expectedEntrySectionType)) |
| 47 | { | 54 | { |
| @@ -91,13 +98,13 @@ namespace WixToolset.Core.Link | |||
| 91 | // Ensure identical symbol's symbol is marked redundant to ensure (should the symbol be | 98 | // Ensure identical symbol's symbol is marked redundant to ensure (should the symbol be |
| 92 | // referenced into the final output) it will not add duplicate primary keys during | 99 | // referenced into the final output) it will not add duplicate primary keys during |
| 93 | // the .IDT importing. | 100 | // the .IDT importing. |
| 94 | //symbol.Row.Redundant = true; - TODO: remove this | ||
| 95 | existingSymbol.AddRedundant(symbolWithSection); | 101 | existingSymbol.AddRedundant(symbolWithSection); |
| 102 | redundantSymbols.Add(symbolWithSection.Symbol); | ||
| 96 | } | 103 | } |
| 97 | else | 104 | else |
| 98 | { | 105 | { |
| 99 | existingSymbol.AddPossibleConflict(symbolWithSection); | 106 | existingSymbol.AddPossibleConflict(symbolWithSection); |
| 100 | possibleConflicts.Add(existingSymbol); | 107 | possibleConflicts.Add(symbolWithSection); |
| 101 | } | 108 | } |
| 102 | } | 109 | } |
| 103 | } | 110 | } |
| @@ -105,6 +112,7 @@ namespace WixToolset.Core.Link | |||
| 105 | 112 | ||
| 106 | this.SymbolsByName = symbolsByName; | 113 | this.SymbolsByName = symbolsByName; |
| 107 | this.PossibleConflicts = possibleConflicts; | 114 | this.PossibleConflicts = possibleConflicts; |
| 115 | this.RedundantSymbols = redundantSymbols; | ||
| 108 | } | 116 | } |
| 109 | } | 117 | } |
| 110 | } | 118 | } |
