diff --git a/GCMM/GCMM.csproj b/GCMM/GCMM.csproj
index c8c2435..d5c7ab8 100644
--- a/GCMM/GCMM.csproj
+++ b/GCMM/GCMM.csproj
@@ -4,6 +4,14 @@
WinExe
net461
true
+ false
+ favicon.ico
+ 1.2.0.0
+ 1.2.0.0
+ 1.2.0
+ NorbiPeti
+ ExMods
+ A mod manager for Gamecraft. It automatically downloads and runs GCIPA and allows the user to install mods.
diff --git a/GCMM/MainPatcher.cs b/GCMM/MainPatcher.cs
index af7955c..0928ab5 100644
--- a/GCMM/MainPatcher.cs
+++ b/GCMM/MainPatcher.cs
@@ -38,7 +38,7 @@ namespace GCMM
playbtn.Text = pnp;
return GameState.Unpatched;
}
- string backup = Directory.EnumerateDirectories(backups).OrderByDescending(s => s).FirstOrDefault();
+ string backup = Directory.EnumerateDirectories(backups).OrderByDescending(name => Directory.GetLastWriteTimeUtc(name)).FirstOrDefault();
if (backup == null)
{
status.Text = nopatch;
@@ -85,13 +85,14 @@ namespace GCMM
{
url = JArray.Parse(await client.DownloadStringTaskAsync(releases)).First["assets"].First["browser_download_url"].ToString();
await client.DownloadFileTaskAsync(url, "IPA.zip");
- ZipFile.ExtractToDirectory("IPA.zip", Settings.Default.GamePath);
+ using (var fs = new FileStream("IPA.zip", FileMode.Open))
+ using (var za = new ZipArchive(fs))
+ za.ExtractToDirectory(Settings.Default.GamePath, true); //Overwrite files that were left from a previous install of the patcher
}
}
+ status = CheckIfPatched();
break;
}
- if (status != GameState.NotFound && status != GameState.NoPatcher)
- status = CheckIfPatched();
switch (status)
{
case GameState.NoPatcher: //Make sure it actually worked