From: azakir Date: Tue, 19 Jan 2021 10:31:46 +0000 (+0100) Subject: some precisions X-Git-Tag: V9_7_0a1~18^2~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b04533874fac449b319a8f515b65174faf6151ff;p=modules%2Fsmesh.git some precisions --- diff --git a/src/SMESH/MG_ADAPT.cxx b/src/SMESH/MG_ADAPT.cxx index 09a06ef86..2445d8cdb 100644 --- a/src/SMESH/MG_ADAPT.cxx +++ b/src/SMESH/MG_ADAPT.cxx @@ -758,12 +758,19 @@ void MgAdapt::execCmd( const char* cmd, int& err) } err = 0; } - +/* + * to delete tmp files .mesh, .sol and if needed + * the log file + * + */ void MgAdapt::cleanUp() { int notOk; std::string errStr; - if(removeOnSuccess) tmpFilesToBeDeleted.push_back(logFile); + if(toKeepWorkingFiles) + return; + if(removeOnSuccess && printLogInFile) + tmpFilesToBeDeleted.push_back(logFile); std::vector< std::string>::iterator it = tmpFilesToBeDeleted.begin(); for (; it!=tmpFilesToBeDeleted.end(); ++it) @@ -819,6 +826,7 @@ std::string MgAdapt::getCommandToRun() cmd+= " --in "+ meshIn; meshFormatOutputMesh = getFileName()+".mesh"; + tmpFilesToBeDeleted.push_back(meshFormatOutputMesh); cmd+= " --out "+ meshFormatOutputMesh; if (useLocalMap || useConstantValue) cmd+= " --sizemap "+ solFileIn; else // (useBackgroundMap) @@ -840,6 +848,7 @@ std::string MgAdapt::getCommandToRun() std::string solFileOut = getFileName()+".sol"; cmd+= " --write_sizemap "+ solFileOut; solFormatOutput.push_back(solFileOut); + tmpFilesToBeDeleted.push_back(solFileOut); } if (verbosityLevel != defaultVerboseLevel()) {