| 57 | } |
| 58 | |
| 59 | fs::path getUserDirectory() |
| 60 | { |
| 61 | auto path = fs::path(getEnvironmentVariable("XDG_CONFIG_HOME")); |
| 62 | if (path.empty()) |
| 63 | { |
| 64 | path = getHomeDirectory(); |
| 65 | if (path.empty()) |
| 66 | { |
| 67 | path = "/"; |
| 68 | } |
| 69 | else |
| 70 | { |
| 71 | path = path / fs::path(".config"); |
| 72 | } |
| 73 | } |
| 74 | return path / fs::path("OpenLoco"); |
| 75 | } |
| 76 | #endif |
| 77 | |
| 78 | #if !(defined(__APPLE__) && defined(__MACH__)) |
no test coverage detected