From 1db687622b7966919a8839f676fc21a321ca2725 Mon Sep 17 00:00:00 2001 From: fmckenna Date: Mon, 30 Sep 2024 23:43:04 -0700 Subject: [PATCH] fmk - updating version to 4.1.0, adding check before recursiveRemove --- WorkflowAppEE_UQ.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/WorkflowAppEE_UQ.cpp b/WorkflowAppEE_UQ.cpp index 604b4ac4..63a551e1 100644 --- a/WorkflowAppEE_UQ.cpp +++ b/WorkflowAppEE_UQ.cpp @@ -93,11 +93,11 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS. #include #include #include +#include // static pointer for global procedure set in constructor static WorkflowAppEE_UQ *theApp = 0; -extern bool isSafeToRemoveRecursivily(const QString &directoryPath); // global procedure int getNumParallelTasks() { @@ -256,7 +256,11 @@ WorkflowAppEE_UQ::setMainWindow(MainWindowWorkflowApp* window) { theMachine, theRemoteService, theOpenSeesApp, - theToolDialog); + theToolDialog); + QStringList filesToDownload; filesToDownload << "results.zip"; + theOpenSeesTool->setFilesToDownload(filesToDownload, false); + + theToolDialog->addTool(theOpenSeesTool, "OpenSees@DesignSafe"); QAction *showOpenSees = toolsMenu->addAction("&OpenSees@DesignSafe"); @@ -617,8 +621,14 @@ WorkflowAppEE_UQ::setUpForApplicationRun(QString &workingDir, QString &subDir) { QDir destinationDirectory(tmpDirectory); if(destinationDirectory.exists()) { - if (isSafeToRemoveRecursivily(tmpDirectory)) + if (SCUtils::isSafeToRemoveRecursivily(tmpDirectory)) destinationDirectory.removeRecursively(); + else { + QString msg("The Program stopped, it was about to recursivily remove: "); + msg.append(tmpDirectory); + fatalMessage(msg); + return; + } } destinationDirectory.mkpath(tmpDirectory);