| 25 | #include "../resources/ids.h" |
| 26 | |
| 27 | std::filesystem::path ConfigManager::DetermineConfigPath(const std::optional<std::filesystem::path> &storageFolder) |
| 28 | { |
| 29 | std::filesystem::path path; |
| 30 | if (storageFolder) |
| 31 | { |
| 32 | path = *storageFolder / L"RoamingState"; |
| 33 | } |
| 34 | else |
| 35 | { |
| 36 | const auto [loc, hr] = win32::GetExeLocation(); |
| 37 | HresultVerify(hr, spdlog::level::critical, L"Failed to determine executable location!"); |
| 38 | path = loc.parent_path(); |
| 39 | } |
| 40 | |
| 41 | path /= CONFIG_FILE; |
| 42 | return path; |
| 43 | } |
| 44 | |
| 45 | void ConfigManager::WatcherCallback(void *context, DWORD, std::wstring_view fileName) |
| 46 | { |
nothing calls this directly
no outgoing calls
no test coverage detected