Permalink
Browse files

Add a quick check to the system manager to make sure the diagnostic g…

…eneration script is executable, and make it so if not.
  • Loading branch information...
1 parent 8d73b92 commit ae9944ac46b01d4080e7b0690889c75eb2af809e Ken Moore committed Mar 5, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 src-qt4/pc-sysmanager/pbsystemtab.cpp
View
6 src-qt4/pc-sysmanager/pbsystemtab.cpp
@@ -117,7 +117,11 @@ void PBSystemTab::CreateSheetFile()
args << username;
//qDebug() << "CMD: " << prog+" "+args.join(" ");
connect( SheetGenScript, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(finishedSheet()) );
-
+ //Make sure the diagnostic generation script is executable
+ QFileInfo info(prog);
+ if(!info.isExecutable()){
+ QFile::setPermissions(prog, info.permissions() | QFile::ExeOther); //executable by anyone
+ }
SheetGenScript->start(prog, args);
}

0 comments on commit ae9944a

Please sign in to comment.