1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 15:23:01 +01:00

Reintroduce XDG_CONFIG_HOME

Accidentally removed resolving the user data path by XDG_CONFIG_HOME environment variable
This commit is contained in:
Ted John
2017-12-03 19:22:35 +00:00
parent 349d19e834
commit 107461bbe8

View File

@@ -30,8 +30,13 @@ namespace Platform
case SPECIAL_FOLDER::USER_CONFIG:
case SPECIAL_FOLDER::USER_DATA:
{
auto home = GetFolderPath(SPECIAL_FOLDER::USER_HOME);
return Path::Combine(home, ".config");
auto path = GetEnvironmentPath("XDG_CONFIG_HOME");
if (path.empty())
{
auto home = GetFolderPath(SPECIAL_FOLDER::USER_HOME);
path = Path::Combine(home, ".config");
}
return path;
}
case SPECIAL_FOLDER::USER_HOME:
return GetHomePath();