From e4a022295403ebee1276d5d135263e0a6853a146 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Wed, 21 Oct 2020 16:48:22 +0200 Subject: [PATCH] Append .exe to crashreporter path so it is better located --- src/gui/application.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index d9272a69d..022ae9a1d 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -263,8 +263,15 @@ Application::Application(int &argc, char **argv) return; #if defined(WITH_CRASHREPORTER) - if (ConfigFile().crashReporter()) - _crashHandler.reset(new CrashReporter::Handler(QDir::tempPath(), true, CRASHREPORTER_EXECUTABLE)); + if (ConfigFile().crashReporter()) { + auto reporter = QStringLiteral(CRASHREPORTER_EXECUTABLE); +#ifdef Q_OS_WIN + if (reporter.endsWith(QLatin1String(".exe"))) { + reporter.append(QLatin1String(".exe")); + } +#endif + _crashHandler.reset(new CrashReporter::Handler(QDir::tempPath(), true, reporter)); + } #endif setupLogging(); -- 2.30.2