Set permissions for the updater binary after updating it.

This commit is contained in:
Petr Mrázek 2013-12-28 22:32:45 +01:00
parent 595e4b697e
commit c816a26647
2 changed files with 12 additions and 1 deletions

View file

@ -528,7 +528,12 @@ void MultiMC::installUpdates(const QString &updateFilesDir, bool restartOnFinish
QLOG_INFO() << "Running updater with command" << updaterBinary << args.join(" ");
QProcess::startDetached(updaterBinary, args);
QFile::setPermissions(updaterBinary, (QFileDevice::Permission) 0755);
if(!QProcess::startDetached(updaterBinary, args))
{
QLOG_ERROR() << "Failed to start the updater process!";
return;
}
// Now that we've started the updater, quit MultiMC.
MMC->quit();