From a07ebb999c18d9d38d7c4c50f6811cd3378118e9 Mon Sep 17 00:00:00 2001 From: fmckenna Date: Mon, 30 Sep 2024 23:45:52 -0700 Subject: [PATCH] fmk - updating version to 4.0.2 --- WorkflowApp_quoFEM.cpp | 20 +++++++++++++++++--- main.cpp | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/WorkflowApp_quoFEM.cpp b/WorkflowApp_quoFEM.cpp index 1d87a70..7f25226 100644 --- a/WorkflowApp_quoFEM.cpp +++ b/WorkflowApp_quoFEM.cpp @@ -37,6 +37,8 @@ UPDATES, ENHANCEMENTS, OR MODIFICATIONS. // Written: fmckenna #include "WorkflowApp_quoFEM.h" +#include + #include #include #include @@ -431,9 +433,21 @@ WorkflowApp_quoFEM::setUpForApplicationRun(QString &workingDir, QString &subDir) QDir destinationDirectory(tmpDirectory); if(destinationDirectory.exists()) { - destinationDirectory.removeRecursively(); - } else - destinationDirectory.mkpath(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; + } + } + + if (destinationDirectory.mkpath(tmpDirectory) == false) { + QString msg("quoFEM::setUpForApplicationRun: Could not mkdir: "); + msg += tmpDirectory; + this->fatalMessage(msg); + } QString templateDirectory = destinationDirectory.absoluteFilePath(subDir); destinationDirectory.mkpath(templateDirectory); diff --git a/main.cpp b/main.cpp index 6b3e426..310f43a 100644 --- a/main.cpp +++ b/main.cpp @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) //Setting Core Application Name, Organization, and Version QCoreApplication::setApplicationName("quoFEM"); QCoreApplication::setOrganizationName("SimCenter"); - QCoreApplication::setApplicationVersion("4.0.1"); + QCoreApplication::setApplicationVersion("4.0.2"); // // set up logging of output messages for user debugging