Use Path.DirectorySeparatorChar instead of "\\" so we get Linux support.

This commit is contained in:
Mads 2020-07-28 18:20:23 +02:00
parent c06e6ae7f3
commit 2574c5c199

View File

@ -242,8 +242,8 @@ namespace saviine_server
string LocalRootDump = root + "\\" + "dump" + "\\" + 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 + "\\" + "inject" + "\\" + ids[0].ToString("X8") + "-" + ids[1].ToString("X8") + "\\"; 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")) if (!ids[0].ToString("X8").Equals("00050000"))
{ {
@ -266,7 +266,7 @@ namespace saviine_server
Console.WriteLine(name + " TitleID: " + ids[0].ToString("X8") + "-" + ids[1].ToString("X8")); Console.WriteLine(name + " TitleID: " + ids[0].ToString("X8") + "-" + ids[1].ToString("X8"));
// Create log file for current thread // 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()); log.WriteLine(name + " Accepted connection from client " + client.Client.RemoteEndPoint.ToString());
string title_id = ids[0].ToString("X8") + "-" + ids[1].ToString("X8"); string title_id = ids[0].ToString("X8") + "-" + ids[1].ToString("X8");
log.WriteLine(name + " TitleID: " + title_id); log.WriteLine(name + " TitleID: " + title_id);