MCPcopy Create free account
hub / github.com/PancakeTAS/lsfg-vk / getConfigFile

Method getConfigFile

src/utils/utils.cpp:239–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239std::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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected