From e35f4913e8342de43001ee3227b84c80ae34a2ba Mon Sep 17 00:00:00 2001 From: rjindael Date: Mon, 31 Jul 2023 02:54:28 -0700 Subject: [PATCH] fix: safer install process in program init --- Kiseki.Launcher.Windows/Program.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Kiseki.Launcher.Windows/Program.cs b/Kiseki.Launcher.Windows/Program.cs index db7a784..b4db7cf 100644 --- a/Kiseki.Launcher.Windows/Program.cs +++ b/Kiseki.Launcher.Windows/Program.cs @@ -23,19 +23,21 @@ namespace Kiseki.Launcher.Windows if (!File.Exists(Directories.Application)) { - // The launcher is not installed, so let's install it. + // The launcher is not installed, so let's run the install process - this will also exit the application Launcher.Install(); } - - if (args.Length == 0) + else { - // Nothing for us to do :P - Process.Start(Web.Url("/games")); - Environment.Exit(0); - } + if (args.Length == 0) + { + // Nothing for us to do :P + Process.Start(Web.Url("/games")); + Environment.Exit(0); + } - ApplicationConfiguration.Initialize(); - Application.Run(new MainWindow(args[0])); + ApplicationConfiguration.Initialize(); + Application.Run(new MainWindow(args[0])); + } } } } \ No newline at end of file