Cache the support dir path.
This commit is contained in:
@@ -62,9 +62,10 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string SupportDir
|
public static string SupportDir { get { return supportDir.Value; } }
|
||||||
{
|
static Lazy<string> supportDir = Exts.Lazy(GetSupportDir);
|
||||||
get
|
|
||||||
|
static string GetSupportDir()
|
||||||
{
|
{
|
||||||
// Use a local directory in the game root if it exists
|
// Use a local directory in the game root if it exists
|
||||||
if (Directory.Exists("Support"))
|
if (Directory.Exists("Support"))
|
||||||
@@ -91,7 +92,6 @@ namespace OpenRA
|
|||||||
|
|
||||||
return dir + Path.DirectorySeparatorChar;
|
return dir + Path.DirectorySeparatorChar;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static string GameDir { get { return AppDomain.CurrentDomain.BaseDirectory; } }
|
public static string GameDir { get { return AppDomain.CurrentDomain.BaseDirectory; } }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user