MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / FindBasePath

Function FindBasePath

src/windows/Main.cpp:66–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void FindBasePath()
67{
68 TCHAR pwStr[MAX_PATH];
69 pwStr[0] = 0;
70 LPCTSTR p1 = NULL, p2 = NULL;
71
72 if (SUCCEEDED(ri::SHGetFolderPath(g_Hwnd, CSIDL_APPDATA, NULL, 0, pwStr)))
73 {
74 SetBasePath(MakeStringFromTString(pwStr));
75 }
76 else
77 {
78 MessageBox(g_Hwnd, TmGetTString(IDS_NO_APPDATA), TmGetTString(IDS_NON_CRITICAL_ERROR), MB_OK | MB_ICONERROR);
79 SetBasePath(".");
80 }
81}
82
83bool TryThisBasePath()
84{

Callers 1

SetupCachePathIfNeededFunction · 0.85

Calls 1

SetBasePathFunction · 0.85

Tested by

no test coverage detected