diff --git a/server/src/SignalHandler.cpp b/server/src/SignalHandler.cpp index 59572f2..145bf34 100644 --- a/server/src/SignalHandler.cpp +++ b/server/src/SignalHandler.cpp @@ -42,13 +42,17 @@ extern bool mainThreadDone; #ifdef BREAKPAD_EXCEPTION_HANDLER static bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded) { if(ts::server::isShuttingDown()) { + /* We don't care about this crash dump. Remove it. */ + std::error_code error_code{}; + fs::remove(fs::u8path(descriptor.path()), error_code); return true; } logCritical(LOG_GENERAL, "The server crashed!"); try { - if(!fs::exists(fs::u8path(ts::config::crash_path))) + if(!fs::exists(fs::u8path(ts::config::crash_path))) { fs::create_directories(fs::u8path(ts::config::crash_path)); + } auto path = fs::u8path(descriptor.path()); path = fs::u8path(ts::config::crash_path + "crash_dump_" + path.filename().string());