Skip to content

Commit a8eaee6

Browse files
committed
fix crashpad destination folder
* now crashpad folder is being properly created using the app data folder
1 parent fb1bfbc commit a8eaee6

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

obs-studio-server/source/util-crashmanager.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ bool util::CrashManager::SetupCrashpad()
556556
#endif
557557

558558
#ifdef __APPLE__
559-
std::string appdata_path = g_util_osx->getUserDataPath();
559+
// Creates crashpad folder
560+
std::string appdata_path = wstring_to_utf8(globalAppData_path) + "/Crashpad";
560561
#endif
561562
db = base::FilePath(appdata_path);
562563
handler = base::FilePath(handler_path);
@@ -566,12 +567,20 @@ bool util::CrashManager::SetupCrashpad()
566567
return false;
567568

568569
database->GetSettings()->SetUploadsEnabled(true);
570+
bool asynchronous_start = true;
571+
#if defined(__APPLE__)
572+
asynchronous_start = false;
573+
#endif
569574

570-
bool rc = client.StartHandler(handler, db, db, reportServerUrl, annotations, arguments, true, true);
575+
bool rc = client.StartHandler(handler, db, db, reportServerUrl, annotations, arguments, /* restartable */ true, asynchronous_start);
571576
if (!rc)
572-
return false;
577+
{
578+
blog(LOG_WARNING, "Unable to start crash handler");
579+
return false;
580+
}
573581

574582
#ifdef WIN32
583+
// Windows will wait since asynchronous_start is set to true.
575584
rc = client.WaitForHandlerStart(INFINITE);
576585
if (!rc)
577586
return false;

0 commit comments

Comments
 (0)