From 107461bbe8f3742f711e1391ea6fc736b0042c11 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 3 Dec 2017 19:22:35 +0000 Subject: [PATCH] Reintroduce XDG_CONFIG_HOME Accidentally removed resolving the user data path by XDG_CONFIG_HOME environment variable --- src/openrct2/platform/Platform.Linux.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp index ed3e105006..32d5d02dd7 100644 --- a/src/openrct2/platform/Platform.Linux.cpp +++ b/src/openrct2/platform/Platform.Linux.cpp @@ -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();