MCPcopy Create free account
hub / github.com/aliasIsolation/aliasIsolation / getRootDirectory

Function getRootDirectory

src/dll/utilities.cpp:8–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6std::string rootDir;
7
8std::string getRootDirectory() {
9 // Only fetch the root directory once.
10 if (rootDir.empty())
11 {
12 // Store the path relative to the current DLL (really AI.exe since we're injected into it).
13 rootDir = std::filesystem::current_path().string() + "\\mods\\aliasIsolation";
14
15 // Have we got the root directory?
16 if (!rootDir.empty())
17 {
18 // We have got the root directory.
19 LOG_MSG("[aliasIsolation::utilities] Got root directory \"%s\".\n", rootDir.c_str());
20 }
21 else
22 {
23 // We failed to get the root directory, break execution here.
24 LOG_MSG("[aliasIsolation::utilities] FATAL ERROR - Failed to get root directory!\n", "");
25 DebugBreak();
26 }
27 }
28
29 return rootDir;
30}
31
32std::string getSettingsFilePath() {
33 WIN32_FIND_DATA findSettingsFileData;

Callers 2

getSettingsFilePathFunction · 0.85
getDataFilePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected