Skip to content

Commit 056ed9c

Browse files
committed
Detect core components more reliably
1 parent 7746fc6 commit 056ed9c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

FlashpointInstaller/src/Common.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public Category(XmlNode node)
122122

123123
Title = GetAttribute(node, "title", true);
124124
Description = GetAttribute(node, "description", true);
125-
Required = ID.StartsWith("core");
125+
Required = ID.Split('-').FirstOrDefault() == "core";
126126
}
127127

128128
protected static string GetAttribute(XmlNode node, string attribute, bool throwError)

FlashpointManager/src/Common.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public Category(XmlNode node)
144144

145145
Title = GetAttribute(node, "title", true);
146146
Description = GetAttribute(node, "description", true);
147-
Required = ID.StartsWith("core");
147+
Required = ID.Split('-').FirstOrDefault() == "core";
148148
}
149149

150150
protected static string GetAttribute(XmlNode node, string attribute, bool throwError)
@@ -346,7 +346,7 @@ void AddToQueue(Component component, long oldSize)
346346
update = componentData[0] != component.Hash;
347347
oldSize = long.Parse(componentData[1]);
348348
}
349-
else if (component.ID.StartsWith("core"))
349+
else if (component.Required)
350350
{
351351
update = true;
352352
}

0 commit comments

Comments
 (0)