mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-05 07:16:29 +00:00
Added Fatal error case for SHGetKnownFolderPath
This commit is contained in:
@@ -134,7 +134,11 @@ std::string Launcher::GetLocalAppdata() {
|
||||
PWSTR folderPath = nullptr;
|
||||
|
||||
HRESULT hr = SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, nullptr, &folderPath);
|
||||
if (!SUCCEEDED(hr))return {};
|
||||
|
||||
if (!SUCCEEDED(hr)) {
|
||||
LOG(FATAL) << "Failed to get path of localAppData";
|
||||
throw ShutdownException("Fatal Error");
|
||||
}
|
||||
|
||||
_bstr_t bstrPath(folderPath);
|
||||
std::string Path((char*)bstrPath);
|
||||
|
||||
Reference in New Issue
Block a user