| 82 | } |
| 83 | |
| 84 | std::string GetFolderPath(SpecialFolder folder) |
| 85 | { |
| 86 | switch (folder) |
| 87 | { |
| 88 | case SpecialFolder::userCache: |
| 89 | case SpecialFolder::userConfig: |
| 90 | case SpecialFolder::userData: |
| 91 | { |
| 92 | auto path = GetEnvironmentPath("XDG_CONFIG_HOME"); |
| 93 | if (path.empty()) |
| 94 | { |
| 95 | auto home = GetFolderPath(SpecialFolder::userHome); |
| 96 | path = Path::Combine(home, u8".config"); |
| 97 | } |
| 98 | return path; |
| 99 | } |
| 100 | case SpecialFolder::userHome: |
| 101 | return GetHomePath(); |
| 102 | default: |
| 103 | return std::string(); |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | std::string GetDocsPath() |
| 108 | { |
no test coverage detected