From 9b852c74816d3f9b76e51af479d32d1cd6498c30 Mon Sep 17 00:00:00 2001 From: Yohoki <44595371+Yohoki@users.noreply.github.com> Date: Tue, 18 Oct 2022 18:41:16 -0500 Subject: [PATCH] Fix: Arguments Break when Updating (#3744) * Wrap Args in quotes -Wrap args in quotes to allow for spaces in dir paths when restarting Ryujinxs from Update. * Wrap second instance of GetCommandLineArgs() * Changed ryuArgs from string to string[] * Update Ryujinx.Ava/Modules/Updater/Updater.cs Co-authored-by: mageven <62494521+mageven@users.noreply.github.com> * Update UpdateDialog.cs Co-authored-by: mageven <62494521+mageven@users.noreply.github.com> --- Ryujinx.Ava/Modules/Updater/Updater.cs | 2 +- Ryujinx/Modules/Updater/UpdateDialog.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Ryujinx.Ava/Modules/Updater/Updater.cs b/Ryujinx.Ava/Modules/Updater/Updater.cs index d3c655b01..2f9258bd0 100644 --- a/Ryujinx.Ava/Modules/Updater/Updater.cs +++ b/Ryujinx.Ava/Modules/Updater/Updater.cs @@ -278,7 +278,7 @@ namespace Ryujinx.Modules { string ryuName = Path.GetFileName(Environment.ProcessPath); string ryuExe = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ryuName); - string ryuArg = string.Join(" ", Environment.GetCommandLineArgs().Skip(1).ToArray()); + var ryuArg = Environment.GetCommandLineArgs().Skip(1); if (!OperatingSystem.IsWindows()) { diff --git a/Ryujinx/Modules/Updater/UpdateDialog.cs b/Ryujinx/Modules/Updater/UpdateDialog.cs index 5e5ef84d6..cdf85427e 100644 --- a/Ryujinx/Modules/Updater/UpdateDialog.cs +++ b/Ryujinx/Modules/Updater/UpdateDialog.cs @@ -48,7 +48,7 @@ namespace Ryujinx.Modules { string ryuName = OperatingSystem.IsWindows() ? "Ryujinx.exe" : "Ryujinx"; string ryuExe = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ryuName); - string ryuArg = string.Join(" ", Environment.GetCommandLineArgs().AsEnumerable().Skip(1).ToArray()); + var ryuArg = Environment.GetCommandLineArgs().AsEnumerable().Skip(1); Process.Start(ryuExe, ryuArg);