Adapt to upcoming environment special folder change.
This commit is contained in:
committed by
Gustas
parent
b09c4f3770
commit
2aa37d9392
@@ -180,7 +180,7 @@ namespace OpenRA
|
|||||||
case PlatformType.OSX:
|
case PlatformType.OSX:
|
||||||
{
|
{
|
||||||
modernUserSupportPath = legacyUserSupportPath = Path.Combine(
|
modernUserSupportPath = legacyUserSupportPath = Path.Combine(
|
||||||
Environment.GetFolderPath(Environment.SpecialFolder.Personal),
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
||||||
"Library", "Application Support", "OpenRA") + Path.DirectorySeparatorChar;
|
"Library", "Application Support", "OpenRA") + Path.DirectorySeparatorChar;
|
||||||
|
|
||||||
systemSupportPath = "/Library/Application Support/OpenRA/";
|
systemSupportPath = "/Library/Application Support/OpenRA/";
|
||||||
@@ -189,11 +189,11 @@ namespace OpenRA
|
|||||||
|
|
||||||
case PlatformType.Linux:
|
case PlatformType.Linux:
|
||||||
{
|
{
|
||||||
legacyUserSupportPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), ".openra") + Path.DirectorySeparatorChar;
|
legacyUserSupportPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".openra") + Path.DirectorySeparatorChar;
|
||||||
|
|
||||||
var xdgConfigHome = Environment.GetEnvironmentVariable("XDG_CONFIG_HOME");
|
var xdgConfigHome = Environment.GetEnvironmentVariable("XDG_CONFIG_HOME");
|
||||||
if (string.IsNullOrEmpty(xdgConfigHome))
|
if (string.IsNullOrEmpty(xdgConfigHome))
|
||||||
xdgConfigHome = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), ".config") + Path.DirectorySeparatorChar;
|
xdgConfigHome = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config") + Path.DirectorySeparatorChar;
|
||||||
|
|
||||||
modernUserSupportPath = Path.Combine(xdgConfigHome, "openra") + Path.DirectorySeparatorChar;
|
modernUserSupportPath = Path.Combine(xdgConfigHome, "openra") + Path.DirectorySeparatorChar;
|
||||||
systemSupportPath = "/var/games/openra/";
|
systemSupportPath = "/var/games/openra/";
|
||||||
|
|||||||
Reference in New Issue
Block a user