From fcdecbd36ce1e35987cef9c5566306cb4f537770 Mon Sep 17 00:00:00 2001 From: Miepee Date: Sat, 12 Feb 2022 15:56:23 +0100 Subject: [PATCH] Fix Linux failing to lanuch updated launcher --- AM2RLauncher/AM2RLauncher/LauncherUpdater.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs b/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs index ec26c08..c40d82a 100644 --- a/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs +++ b/AM2RLauncher/AM2RLauncher/LauncherUpdater.cs @@ -14,7 +14,7 @@ namespace AM2RLauncher //TODO: Mac support for autoupdater in general public static class LauncherUpdater { - // How often this was broken count: 6 + // How often this was broken count: 7 // Auto updating is fun! /// The Version that identifies this current release. @@ -207,9 +207,7 @@ namespace AM2RLauncher CrossPlatformOperations.CopyOldConfigToNewConfig(); log.Info("Files extracted. Preparing to restart executable..."); - - // TODO: This will fail if CWD is not where the launcher is located. Use absolute path here. - if (OS.IsLinux) System.Diagnostics.Process.Start("chmod", "+x ./AM2RLauncher.Gtk"); + if (OS.IsLinux) System.Diagnostics.Process.Start("chmod", "+x " + updatePath + "./AM2RLauncher.Gtk"); System.Diagnostics.Process.Start(updatePath + "/" + CrossPlatformOperations.LAUNCHERNAME); Environment.Exit(0); @@ -220,4 +218,4 @@ namespace AM2RLauncher } } } -} +} \ No newline at end of file