mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Unix slashes in file path when using Mono
Bug report by MousePak
This commit is contained in:
parent
2907b9c587
commit
608eb8059c
2 changed files with 10 additions and 9 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue