diff --git a/src/RunGui.cpp b/src/RunGui.cpp index 62f1d6a43d5..19ac9413c19 100644 --- a/src/RunGui.cpp +++ b/src/RunGui.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #ifdef USEWINSDK @@ -244,7 +245,8 @@ void runGui(QApplication &a, Paths &paths, Settings &settings) restartOnSignal = value; }); - auto thread = std::thread([dir = paths.miscDirectory] { + auto thread = std::jthread([dir = paths.miscDirectory] { +#ifdef Q_OS_WIN32 { auto path = combinePath(dir, "Update.exe"); if (QFile::exists(path)) @@ -259,6 +261,7 @@ void runGui(QApplication &a, Paths &paths, Settings &settings) QFile::remove(path); } } +#endif }); // Clear the cache 1 minute after start. @@ -314,7 +317,5 @@ void runGui(QApplication &a, Paths &paths, Settings &settings) // flushing windows clipboard to keep copied messages flushClipboard(); #endif - - _exit(0); } } // namespace chatterino