Skip to content
Snippets Groups Projects

Fix in StateTreeController for logDirs

Merged GitLab Importer requested to merge stateTreeControllerFix into master
1 file
+ 7
2
Compare changes
  • Side-by-side
  • Inline
@@ -1082,8 +1082,13 @@ void StateTreeController::executeGroup(StatechartGroupPtr group, QString startSt
args << "--ArmarX.ApplicationName=" + group->getName() + "StateComponentApp";
QString path = QString::fromStdString(core.getBinaryDir()) + "/XMLRemoteStateOffererRun";
ARMARX_INFO_S << path << " with " << args.toVector().toStdVector();
std::string tempLogDir = (boost::filesystem::temp_directory_path() / "armarx" / group->getName().toStdString()).string();
if (!boost::filesystem::create_directories(tempLogDir))
std::string username;
if (getenv("USER"))
{
username = getenv("USER");
}
std::string tempLogDir = (boost::filesystem::temp_directory_path() / ("armarx-" + username) / group->getName().toStdString()).string();
if (!boost::filesystem::exists(tempLogDir) && !boost::filesystem::create_directories(tempLogDir))
{
ARMARX_WARNING_S << "Could not create log dirs for executing group - aborting";
return;
Loading