mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-28 11:20:53 +00:00
Fixed: Make upgrade script executable under UNIX
This commit is contained in:
parent
ee1c27ebd4
commit
cd4881f61e
1 changed files with 15 additions and 0 deletions
|
@ -468,6 +468,21 @@ void COperationDialog::extractBnpClient()
|
|||
env.insert("STARTUPPATH", "");
|
||||
process.setProcessEnvironment(env);
|
||||
|
||||
// permissions to execute script
|
||||
QFileDevice::Permissions permissions;
|
||||
permissions |= QFileDevice::ExeOther;
|
||||
permissions |= QFileDevice::ExeOwner;
|
||||
permissions |= QFileDevice::ExeUser;
|
||||
permissions |= QFileDevice::ReadOther;
|
||||
permissions |= QFileDevice::ReadOwner;
|
||||
permissions |= QFileDevice::ReadUser;
|
||||
permissions |= QFileDevice::WriteOwner;
|
||||
|
||||
if (!QFile::setPermissions(upgradeScript, permissions))
|
||||
{
|
||||
qDebug() << "Unable to set executable flag to" << upgradeScript;
|
||||
}
|
||||
|
||||
process.start(upgradeScript);
|
||||
|
||||
while (process.waitForFinished())
|
||||
|
|
Loading…
Reference in a new issue