From: eap Date: Wed, 11 Aug 2021 14:35:58 +0000 (+0300) Subject: Prevent exception in MgAdapt::MgAdapt() in case if SALOME_TMP_DIR specifies X-Git-Tag: V9_8_0a1~2^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c5da1b9d0745c6eeaaec89636380d4580ba7c66;p=modules%2Fsmesh.git Prevent exception in MgAdapt::MgAdapt() in case if SALOME_TMP_DIR specifies unexciting directory --- 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