MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / DetermineConfigPath

Method DetermineConfigPath

TranslucentTB/managers/configmanager.cpp:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "../resources/ids.h"
26
27std::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
45void ConfigManager::WatcherCallback(void *context, DWORD, std::wstring_view fileName)
46{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected