use System.IO.Path.DirectorySeparatorChar instead of hardcoded \\ for mono UNIX compatility

This commit is contained in:
bjoern
2015-04-25 16:10:21 +02:00
parent 0bd1d28aee
commit 376977779f

View File

@@ -74,7 +74,7 @@ namespace WfcReplay
fileName = makeFileNameSafe(fileName);
writeFile(fileName, outStream);
Console.WriteLine("Success!");
Console.WriteLine("Code written to " + Directory.GetCurrentDirectory() + "\\" + fileName + ".");
Console.WriteLine("Code written to " + Directory.GetCurrentDirectory() + System.IO.Path.DirectorySeparatorChar + fileName + ".");
}
else if (!checkMode)
{
@@ -172,7 +172,7 @@ namespace WfcReplay
if (local)
#endif
{
tempFolderPath = @"temp\";
tempFolderPath = @"temp"+System.IO.Path.DirectorySeparatorChar;
if (Directory.Exists(tempFolderPath))
{
try
@@ -184,7 +184,7 @@ namespace WfcReplay
}
else
{
tempFolderPath = Path.GetTempPath() + @"WfcReplay\";
tempFolderPath = Path.GetTempPath() + @"WfcReplay"+System.IO.Path.DirectorySeparatorChar;
}
tempFolderPath = Directory.CreateDirectory(tempFolderPath).FullName;
}