This commit is contained in:
parhelia512 2025-10-04 02:33:11 +08:00
parent 34ba9576c5
commit 94a954d5f6

View File

@ -924,7 +924,12 @@ void MainWindow::on_menu_exit_triggered() {
//
if (exit_reason == 1) {
QDir::setCurrent(QApplication::applicationDirPath());
#ifdef Q_OS_WIN
QFile::copy("./updater.exe", "./updater.old");
QProcess::startDetached("./updater.old", QStringList{});
#else
QProcess::startDetached("./updater", QStringList{});
#endif
} else if (exit_reason == 2 || exit_reason == 3 || exit_reason == 4) {
QDir::setCurrent(QApplication::applicationDirPath());