From ae5e12402c6fed0f4bd1ab0367d921902ee5cab3 Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Sun, 18 Apr 2021 20:33:08 +0200 Subject: [PATCH] this is supposed to be the last commit, I forgot to save earlier --- AM2RLauncher/AM2RLauncher/LauncherUpdater.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs b/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs index fd41399..b2c8edc 100644 --- a/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs +++ b/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs @@ -132,9 +132,13 @@ namespace AM2RLauncher foreach (var file in new DirectoryInfo(tmpUpdatePath).GetFiles()) { - log.Info("Moving " + tmpUpdatePath + file.FullName + " to " + CrossPlatformOperations.CURRENTPATH + "/" + file.Name); - File.Copy(tmpUpdatePath + file.FullName, CrossPlatformOperations.CURRENTPATH + "/" + file.Name, true); + log.Info("Moving " + file.FullName + " to " + CrossPlatformOperations.CURRENTPATH + "/" + file.Name); + File.Copy(file.FullName, CrossPlatformOperations.CURRENTPATH + "/" + file.Name, true); } + // for windows, the actual application is in "AM2RLauncher.dll". Which means, we need to update the lib folder as well. + if (currentPlatform.IsWinForms) + MainForm.DirectoryCopy(tmpUpdatePath + "lib", CrossPlatformOperations.CURRENTPATH + "/lib", true); + Directory.Delete(tmpUpdatePath, true); CrossPlatformOperations.CopyOldConfigToNewConfig();