diff --git a/SabreHelper/Build.cs b/SabreHelper/Build.cs
index 2b65ae2a..5666f4dd 100644
--- a/SabreHelper/Build.cs
+++ b/SabreHelper/Build.cs
@@ -14,6 +14,14 @@ namespace SabreTools.Helper
get { return "0.6.0.0"; }
}
+ ///
+ /// Returns true if running in a Mono environment
+ ///
+ public static bool MonoEnvironment
+ {
+ get { return (Type.GetType("Mono.Runtime") != null); }
+ }
+
///
/// The path to the root of the 7z binaries and DLLs
///
@@ -21,9 +29,8 @@ namespace SabreTools.Helper
{
get
{
- bool isMono = (Type.GetType("Mono.Runtime") != null);
char delim = (Environment.CurrentDirectory.Contains("\\") ? '\\' : '/');
- return Environment.CurrentDirectory + delim + (!isMono && Environment.Is64BitOperatingSystem ? "x64" : "x86") + delim;
+ return Environment.CurrentDirectory + delim + (!MonoEnvironment && Environment.Is64BitOperatingSystem ? "x64" : "x86") + delim;
}
}