Use built-in path delim...

This commit is contained in:
Matt Nadareski
2016-04-12 16:33:15 -07:00
parent 25469e0068
commit 1e685ad948
2 changed files with 14 additions and 30 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace SabreTools.Helper
@@ -19,15 +20,7 @@ namespace SabreTools.Helper
/// </summary>
public static bool MonoEnvironment
{
get { return (Type.GetType("Mono.Runtime") != null); }
}
/// <summary>
/// The path delimiter for the current environment
/// </summary>
public static char PathDelim
{
get { return (Environment.CurrentDirectory.Contains("\\") ? '\\' : '/'); }
get { return (Type.GetType("Mono.Runtime") != null); }
}
/// <summary>
@@ -37,7 +30,7 @@ namespace SabreTools.Helper
{
get
{
return Environment.CurrentDirectory + PathDelim + (!MonoEnvironment && Environment.Is64BitOperatingSystem ? "x64" : "x86") + PathDelim;
return Environment.CurrentDirectory + Path.DirectorySeparatorChar + (!MonoEnvironment && Environment.Is64BitOperatingSystem ? "x64" : "x86") + Path.DirectorySeparatorChar;
}
}