| 237 | } |
| 238 | |
| 239 | std::string Utils::getConfigFile() { |
| 240 | const char* configFile = std::getenv("LSFG_CONFIG"); |
| 241 | if (configFile && *configFile != '\0') |
| 242 | return{configFile}; |
| 243 | const char* xdgPath = std::getenv("XDG_CONFIG_HOME"); |
| 244 | if (xdgPath && *xdgPath != '\0') |
| 245 | return std::string(xdgPath) + "/lsfg-vk/conf.toml"; |
| 246 | const char* homePath = std::getenv("HOME"); |
| 247 | if (homePath && *homePath != '\0') |
| 248 | return std::string(homePath) + "/.config/lsfg-vk/conf.toml"; |
| 249 | return "/etc/lsfg-vk/conf.toml"; |
| 250 | } |
nothing calls this directly
no outgoing calls
no test coverage detected