Append .exe to crashreporter path so it is better located

This commit is contained in:
Hannah von Reth 2020-10-21 16:48:22 +02:00 committed by Kevin Ottens
parent 440b31986a
commit e4a0222954
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -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();