Salome HOME
Forcing removal of temporary output file for MG_adapt
[modules/smesh.git] / src / SMESH / MG_ADAPT.cxx
index 633d712834ff972ab582bbbe8eed670f15417f08..54553fd1087f80aff0e032ffc96a93687c7bb880 100644 (file)
@@ -956,6 +956,15 @@ std::string MgAdapt::getCommandToRun()
   cmd+= " --in "+ meshIn;
   meshFormatOutputMesh = getFileName()+".mesh";
   tmpFilesToBeDeleted.push_back(meshFormatOutputMesh);
+  if ( isFileExist( meshFormatOutputMesh )){
+    int notOk;
+    errStr=removeFile(meshFormatOutputMesh , notOk);
+    if (notOk)
+    {
+      appendMsgToLogFile(errStr);
+    }
+  }
+
   cmd+= " --out "+ meshFormatOutputMesh;
   if (useLocalMap || useConstantValue) cmd+= " --sizemap "+ solFileIn;
   else //  (useBackgroundMap)