diff --git a/MinecraftClient/ChatBots/Script.cs b/MinecraftClient/ChatBots/Script.cs index d8dbec96..63717fcc 100644 --- a/MinecraftClient/ChatBots/Script.cs +++ b/MinecraftClient/ChatBots/Script.cs @@ -33,15 +33,16 @@ namespace MinecraftClient.ChatBots public static bool lookForScript(ref string filename) { //Automatically look in subfolders and try to add ".txt" file extension + char dir_slash = Program.isUsingMono ? '/' : '\\'; string[] files = new string[] - { - filename, - filename + ".txt", - "scripts\\" + filename, - "scripts\\" + filename + ".txt", - "config\\" + filename, - "config\\" + filename + ".txt", - }; + { + filename, + filename + ".txt", + "scripts" + dir_slash + filename, + "scripts" + dir_slash + filename + ".txt", + "config" + dir_slash + filename, + "config" + dir_slash + filename + ".txt", + }; foreach (string possible_file in files) { diff --git a/MinecraftClient/Protocol/Handlers/ChatParser.cs b/MinecraftClient/Protocol/Handlers/ChatParser.cs index e6694528..df86f8a4 100644 --- a/MinecraftClient/Protocol/Handlers/ChatParser.cs +++ b/MinecraftClient/Protocol/Handlers/ChatParser.cs @@ -100,7 +100,7 @@ namespace MinecraftClient.Protocol.Handlers if (!System.IO.Directory.Exists("lang")) System.IO.Directory.CreateDirectory("lang"); - string Language_File = "lang\\" + Settings.Language + ".lang"; + string Language_File = "lang" + (Program.isUsingMono ? '/' : '\\') + Settings.Language + ".lang"; //File not found? Try downloading language file from Mojang's servers? if (!System.IO.File.Exists(Language_File))