Salome HOME
Prevent exception in MgAdapt::MgAdapt() in case if SALOME_TMP_DIR specifies
[modules/smesh.git] / src / SMESH / MG_ADAPT.cxx
index 1e748c5342aa4359611856a17f63c6c28cb3fa45..d490092d1e833ef2c5b00c32760c4ee402bbd343 100644 (file)
@@ -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