diff --git a/components/crashcatcher/crashcatcher.hpp b/components/crashcatcher/crashcatcher.hpp index 393a6f5bf5..a9efcaccdc 100644 --- a/components/crashcatcher/crashcatcher.hpp +++ b/components/crashcatcher/crashcatcher.hpp @@ -1,6 +1,7 @@ #ifndef CRASHCATCHER_H #define CRASHCATCHER_H +#include #include #if (defined(__APPLE__) || (defined(__linux) && !defined(ANDROID)) || (defined(__unix) && !defined(ANDROID)) \ diff --git a/components/debug/debugging.cpp b/components/debug/debugging.cpp index cfd3b75ba2..e528f148c6 100644 --- a/components/debug/debugging.cpp +++ b/components/debug/debugging.cpp @@ -329,12 +329,13 @@ int wrapApplication(int (*innerApplication)(int argc, char* argv[]), int argc, c { #if defined(_WIN32) const std::string crashLogName = Misc::StringUtils::lowerCase(appName) + "-crash.dmp"; - Crash::CrashCatcher crashy(argc, argv, Files::pathToUnicodeString(cfgMgr.getLogPath() / crashLogName)); + Crash::CrashCatcher crashy( + argc, argv, Files::pathToUnicodeString(std::filesystem::temp_directory_path() / crashLogName)); #else const std::string crashLogName = Misc::StringUtils::lowerCase(appName) + "-crash.log"; - // install the crash handler as soon as possible. note that the log path - // does not depend on config being read. - crashCatcherInstall(argc, argv, Files::pathToUnicodeString(cfgMgr.getLogPath() / crashLogName)); + // install the crash handler as soon as possible. + crashCatcherInstall( + argc, argv, Files::pathToUnicodeString(std::filesystem::temp_directory_path() / crashLogName)); #endif ret = innerApplication(argc, argv); }