From ec620e2de0e65eac10bff64f0774abcd6857c743 Mon Sep 17 00:00:00 2001 From: Patrick Grabensteiner <35697862+PatrickGrabensteiner@users.noreply.github.com> Date: Tue, 28 Apr 2020 03:50:36 +0200 Subject: [PATCH] Create log folder if not exists fixes #1143 (#1146) * Create log folder if not exists fixes #1143 * Fixed Format Co-authored-by: Patrick Grabensteiner --- Ryujinx/Ui/SwitchSettings.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Ryujinx/Ui/SwitchSettings.cs b/Ryujinx/Ui/SwitchSettings.cs index 700d05968..284355727 100644 --- a/Ryujinx/Ui/SwitchSettings.cs +++ b/Ryujinx/Ui/SwitchSettings.cs @@ -462,9 +462,14 @@ namespace Ryujinx.Ui private void OpenLogsFolder_Pressed(object sender, EventArgs args) { + string logPath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs"); + + DirectoryInfo directory = new DirectoryInfo(logPath); + directory.Create(); + Process.Start(new ProcessStartInfo() { - FileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs"), + FileName = logPath, UseShellExecute = true, Verb = "open" });