diff options
Diffstat (limited to 'ZeroTierUI')
| -rw-r--r-- | ZeroTierUI/installdialog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ZeroTierUI/installdialog.cpp b/ZeroTierUI/installdialog.cpp index 14ad5b6a..29bc0ec7 100644 --- a/ZeroTierUI/installdialog.cpp +++ b/ZeroTierUI/installdialog.cpp @@ -161,6 +161,14 @@ void InstallDialog::on_networkReply(QNetworkReply *reply) unlink(tmpPath.c_str()); unlink(instPath.c_str()); + // Restart the binary with whatever updates may have occurred + std::string appPath(QCoreApplication::applicationFilePath().toStdString()); + execl(appPath.c_str(),appPath.c_str(),(const char *)0); + + // We only make it here if execl() fails + QMessageBox::critical(this,"Re-Launch Failed","An error occurred re-launching ZeroTier One.app. Try launching it manually.",QMessageBox::Ok,QMessageBox::NoButton); + QApplication::exit(1); + return; } #endif |
