MCPcopy Create free account
hub / github.com/crossuo/crossuo / GetConfigFile

Function GetConfigFile

src/Config.cpp:347–358  ·  view source on GitHub ↗

priority order looking for a config file: 1. command line -c/--config option 2. crossuo.cfg on the side with executable 3. crossuo.cfg in the crossuo appdata

Source from the content-addressed store, hash-verified

345// 2. crossuo.cfg on the side with executable
346// 3. crossuo.cfg in the crossuo appdata
347static fs_path GetConfigFile()
348{
349 if (!g_cli["config"].was_set())
350 {
351 const auto local_exe = g_App.ExeFilePath(CROSSUO_CONFIG);
352 if (fs_path_exists(local_exe))
353 return local_exe;
354 return g_App.FilePath(CROSSUO_CONFIG);
355 }
356
357 return fs_path_from(g_cli["config"].get().string);
358}
359
360bool LoadGlobalConfig()
361{

Callers 2

LoadGlobalConfigFunction · 0.85
SaveGlobalConfigFunction · 0.85

Calls 6

fs_path_existsFunction · 0.85
fs_path_fromFunction · 0.85
was_setMethod · 0.80
ExeFilePathMethod · 0.80
FilePathMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected