Skip to content

Commit cbecec1

Browse files
committed
Make install-size optional, part 2
1 parent 9b87d9c commit cbecec1

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

FlashpointInstaller/src/Common.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,10 @@ public Component(XmlNode node) : base(node)
6262

6363
// Size
6464

65-
long size;
65+
long size = 0;
66+
string stringSize = GetAttribute(node, "install-size", false);
6667

67-
if (long.TryParse(GetAttribute(node, "install-size", true), out size))
68-
{
69-
Size = size;
70-
}
71-
else
68+
if (stringSize != "" && !long.TryParse(stringSize, out size))
7269
{
7370
MessageBox.Show(
7471
"An error occurred while parsing the component list XML. Please alert Flashpoint staff ASAP!\n\n" +
@@ -79,6 +76,8 @@ public Component(XmlNode node) : base(node)
7976
Environment.Exit(1);
8077
}
8178

79+
Size = size;
80+
8281
// Path
8382

8483
Path = GetAttribute(node, "path", false);

0 commit comments

Comments
 (0)