From cb158a42a1be0338f69b17c638ee2e2a62c0ab07 Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Sat, 31 Jul 2021 19:57:40 +0200 Subject: [PATCH] Revert "Accomodate for zips where the game is packed one directory below" This reverts commit 62ff7a51f4de18f9b92daf275b48cca1387623a9. --- AM2RLauncher/AM2RLauncher/MainForm/MainForm.Methods.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Methods.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Methods.cs index 74d0e52..ad6aadd 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Methods.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Methods.cs @@ -1118,17 +1118,9 @@ namespace AM2RLauncher string tmpPath = Path.GetTempPath() + Path.GetFileNameWithoutExtension(zipPath); - // clean up in case folder exists already - if (Directory.Exists(tmpPath)) - Directory.Delete(tmpPath, true); - //extract zip to tmp path first ZipFile.ExtractToDirectory(zipPath, tmpPath); - // If the game is packed into a subfolder, accomodate for that - if (Directory.GetDirectories(tmpPath).Length == 1 && Directory.GetDirectories(tmpPath).First() != "lang") - tmpPath = Directory.GetDirectories(tmpPath).First(); - // check if exe exists if (!File.Exists(tmpPath + "/AM2R.exe")) return IsZipAM2R11ReturnCodes.MissingAM2RExe;