[win-linux] speed up application restart after update

This commit is contained in:
SimplestStudio
2023-10-24 07:23:56 +03:00
parent 4eec1e8364
commit a80fbe48ab

View File

@ -595,15 +595,15 @@ void CSvcManager::startReplacingFiles(const tstring &packageType, const bool res
}
}
// Remove Backup dir
NS_File::removeDirRecursively(tmpPath);
// Restart program
if (restartAfterUpdate) {
if (!NS_File::runProcess(appPath + APP_LAUNCH_NAME, _T("")))
NS_Logger::WriteLog(_T("An error occurred while restarting the program!"), true);
}
// Remove Backup dir
NS_File::removeDirRecursively(tmpPath);
// Restart service
#ifdef _WIN32
restartService();