2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 08:25:38 +00:00

closing logs and working file before relaunching Telegram

This commit is contained in:
John Preston
2016-02-08 13:50:56 +03:00
parent 520d82b0ff
commit b3da86bf08
5 changed files with 28 additions and 2 deletions

View File

@@ -2284,6 +2284,8 @@ void psExecTelegram(const QString &crashreport) {
QString telegram(QDir::toNativeSeparators(cExeDir() + cExeName())), wdir(QDir::toNativeSeparators(cWorkingDir()));
DEBUG_LOG(("Application Info: executing %1 %2").arg(cExeDir() + cExeName()).arg(targs));
Logs::closeMain();
SignalHandlers::finish();
HINSTANCE r = ShellExecute(0, 0, telegram.toStdWString().c_str(), targs.toStdWString().c_str(), wdir.isEmpty() ? 0 : wdir.toStdWString().c_str(), SW_SHOWNORMAL);
if (long(r) < 32) {
DEBUG_LOG(("Application Error: failed to execute %1, working directory: '%2', result: %3").arg(telegram).arg(wdir).arg(long(r)));