Other misc fixes in Platform.

This commit is contained in:
Paul Chote
2016-09-14 19:46:58 +01:00
parent 1eac43fa6d
commit 632b277a0e

View File

@@ -39,8 +39,8 @@ namespace OpenRA
var kernelName = p.StandardOutput.ReadToEnd(); var kernelName = p.StandardOutput.ReadToEnd();
if (kernelName.Contains("Darwin")) if (kernelName.Contains("Darwin"))
return PlatformType.OSX; return PlatformType.OSX;
else
return PlatformType.Linux; return PlatformType.Linux;
} }
catch { } catch { }
@@ -82,7 +82,6 @@ namespace OpenRA
case PlatformType.OSX: case PlatformType.OSX:
dir += "/Library/Application Support/OpenRA"; dir += "/Library/Application Support/OpenRA";
break; break;
case PlatformType.Linux:
default: default:
dir += "/.openra"; dir += "/.openra";
break; break;
@@ -101,11 +100,11 @@ namespace OpenRA
{ {
path = path.TrimEnd(new char[] { ' ', '\t' }); path = path.TrimEnd(new char[] { ' ', '\t' });
// paths starting with ^ are relative to the support dir // Paths starting with ^ are relative to the support dir
if (path.StartsWith("^", StringComparison.Ordinal)) if (path.StartsWith("^", StringComparison.Ordinal))
path = SupportDir + path.Substring(1); path = SupportDir + path.Substring(1);
// paths starting with . are relative to the game dir // Paths starting with . are relative to the game dir
if (path == ".") if (path == ".")
return GameDir; return GameDir;