Salome HOME
Forcing removal of temporary output file for MG_adapt
authorYOANN AUDOUIN <B61570@dsp1062659>
Mon, 11 Sep 2023 13:36:36 +0000 (15:36 +0200)
committerYOANN AUDOUIN <B61570@dsp1062659>
Mon, 11 Sep 2023 13:36:36 +0000 (15:36 +0200)
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)