From 8c5da1b9d0745c6eeaaec89636380d4580ba7c66 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 11 Aug 2021 17:35:58 +0300 Subject: [PATCH] Prevent exception in MgAdapt::MgAdapt() in case if SALOME_TMP_DIR specifies unexciting directory --- src/SMESH/MG_ADAPT.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SMESH/MG_ADAPT.cxx b/src/SMESH/MG_ADAPT.cxx index 1e748c534..d490092d1 100644 --- a/src/SMESH/MG_ADAPT.cxx +++ b/src/SMESH/MG_ADAPT.cxx @@ -322,7 +322,7 @@ MgAdaptHypothesisData* MgAdapt::getData() const } void MgAdapt::setMedFileIn(std::string fileName) { - if ( isFileExist(fileName) ) + if ( isFileExist( fileName )) { medFileIn = fileName; @@ -1094,7 +1094,9 @@ std::string MgAdapt::defaultWorkingDirectory() { aTmpDir = Tmp_dir; } - else { + + if ( ! isFileExist( aTmpDir )) + { #ifdef WIN32 aTmpDir = "C:\\"; #else -- 2.39.2