diff options
Diffstat (limited to 'src/ext/Util/wixext/UtilDecompiler.cs')
-rw-r--r-- | src/ext/Util/wixext/UtilDecompiler.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/ext/Util/wixext/UtilDecompiler.cs b/src/ext/Util/wixext/UtilDecompiler.cs index 53b75b8d..a236ece9 100644 --- a/src/ext/Util/wixext/UtilDecompiler.cs +++ b/src/ext/Util/wixext/UtilDecompiler.cs | |||
@@ -478,14 +478,26 @@ namespace WixToolset.Util | |||
478 | { | 478 | { |
479 | foreach (var row in table.Rows) | 479 | foreach (var row in table.Rows) |
480 | { | 480 | { |
481 | var parentId = row.FieldAsString(0); | ||
482 | var parentExists = this.DecompilerHelper.TryGetIndexedElement("Group", parentId, out var parentGroup); | ||
483 | |||
481 | var childId = row.FieldAsString(1); | 484 | var childId = row.FieldAsString(1); |
482 | if (this.DecompilerHelper.TryGetIndexedElement("Group", childId, out var group)) | 485 | var childExists = this.DecompilerHelper.TryGetIndexedElement("Group", childId, out var childGroup); |
486 | |||
487 | if (parentExists && childExists) | ||
483 | { | 488 | { |
484 | group.Add(new XElement(UtilConstants.GroupRefName, new XAttribute("Id", row.FieldAsString(0)))); | 489 | childGroup.Add(new XElement(UtilConstants.GroupRefName, new XAttribute("Id", parentId))); |
485 | } | 490 | } |
486 | else | 491 | else |
487 | { | 492 | { |
488 | this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Parent_", childId, "Group")); | 493 | if(!parentExists) |
494 | { | ||
495 | this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Parent_", parentId, "Group")); | ||
496 | } | ||
497 | if (!childExists) | ||
498 | { | ||
499 | this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Child_", childId, "Group")); | ||
500 | } | ||
489 | } | 501 | } |
490 | } | 502 | } |
491 | } | 503 | } |