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
| 345 | // 2. crossuo.cfg on the side with executable |
| 346 | // 3. crossuo.cfg in the crossuo appdata |
| 347 | static 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 | |
| 360 | bool LoadGlobalConfig() |
| 361 | { |
no test coverage detected