Skip to content

Commit

Permalink
Fixed a bug where mods installed from zips dont automatically activate
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewinator56 committed Jun 24, 2021
1 parent 04935d5 commit 07dccb0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions StormLoader/StormLoader/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ public void addModFromFile(string path, string nameWithoutExt, string ext)
{
AddModFromZip(path, nameWithoutExt);
}

XmlDocument meta = new XmlDocument();
meta.Load(modExtractionDir + "/" + nameWithoutExt + "/metadata.xml");
DbgLog.WriteLine(meta.OuterXml);


AddModNew(modExtractionDir + "/" + nameWithoutExt, nameWithoutExt, meta.SelectSingleNode("/Metadata/Version").InnerText, meta.SelectSingleNode("/Metadata/Author").InnerText);

displayModList();
ApplyProfileAlt();
}
Expand All @@ -220,12 +226,7 @@ private void AddModFromSLP(string path, string nameWithoutExt)
{
ZipFile z = new ZipFile(path);
z.ExtractAll(modExtractionDir + "/" + nameWithoutExt, ExtractExistingFileAction.OverwriteSilently);
XmlDocument meta = new XmlDocument();
meta.Load(modExtractionDir + "/" + nameWithoutExt + "/metadata.xml");
DbgLog.WriteLine(meta.OuterXml);


AddModNew(modExtractionDir + "/" + nameWithoutExt, nameWithoutExt, meta.SelectSingleNode("/Metadata/Version").InnerText, meta.SelectSingleNode("/Metadata/Author").InnerText);

}
private void AddModFromZip(string path, string nameWithoutExt)
{
Expand Down

0 comments on commit 07dccb0

Please sign in to comment.