From 2574c5c1994b0b3c2baf5873b1824bb97884b08b Mon Sep 17 00:00:00 2001 From: Mads Date: Tue, 28 Jul 2020 18:20:23 +0200 Subject: [PATCH] Use Path.DirectorySeparatorChar instead of "\\" so we get Linux support. --- server/src/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/Program.cs b/server/src/Program.cs index 388c98d..2883152 100644 --- a/server/src/Program.cs +++ b/server/src/Program.cs @@ -242,8 +242,8 @@ static void Handle(object client_obj) - string LocalRootDump = root + "\\" + "dump" + "\\" + ids[0].ToString("X8") + "-" + ids[1].ToString("X8") + "\\"; - string LocalRootInject = root + "\\" + "inject" + "\\" + ids[0].ToString("X8") + "-" + ids[1].ToString("X8") + "\\"; + string LocalRootDump = root + Path.DirectorySeparatorChar + "dump" + Path.DirectorySeparatorChar + ids[0].ToString("X8") + "-" + ids[1].ToString("X8") + Path.DirectorySeparatorChar; + string LocalRootInject = root + Path.DirectorySeparatorChar + "inject" + Path.DirectorySeparatorChar + ids[0].ToString("X8") + "-" + ids[1].ToString("X8") + Path.DirectorySeparatorChar; if (!ids[0].ToString("X8").Equals("00050000")) { @@ -266,7 +266,7 @@ static void Handle(object client_obj) Console.WriteLine(name + " TitleID: " + ids[0].ToString("X8") + "-" + ids[1].ToString("X8")); // Create log file for current thread - log = new StreamWriter(logs_root + "\\" + DateTime.Now.ToString("yyyy-MM-dd") + "-" + name + "-" + ids[0].ToString("X8") + "-" + ids[1].ToString("X8") + ".txt", true, Encoding.ASCII, 1024*64); + log = new StreamWriter(logs_root + Path.DirectorySeparatorChar + DateTime.Now.ToString("yyyy-MM-dd") + "-" + name + "-" + ids[0].ToString("X8") + "-" + ids[1].ToString("X8") + ".txt", true, Encoding.ASCII, 1024*64); log.WriteLine(name + " Accepted connection from client " + client.Client.RemoteEndPoint.ToString()); string title_id = ids[0].ToString("X8") + "-" + ids[1].ToString("X8"); log.WriteLine(name + " TitleID: " + title_id);