Salome HOME
Remove unnecessary trace from console. V9_2_2_BR V9_2_2
authorrnv <rnv@opencascade.com>
Thu, 28 Feb 2019 17:10:53 +0000 (20:10 +0300)
committerrnv <rnv@opencascade.com>
Thu, 28 Feb 2019 17:10:53 +0000 (20:10 +0300)
src/Container/Container_i.cxx
src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx

index d34b36ba839674dd460eded40ab72b38c99b31ff..92db1e0adcfee23f14e16ff12cae5d84593e66aa 100644 (file)
@@ -1853,12 +1853,13 @@ void Engines_Container_i::clearTemporaryFiles()
 {
   std::list<std::string>::const_iterator it;
   for ( it = _tmp_files.begin(); it != _tmp_files.end(); ++it ) {
-#ifdef WIN32
-    std::string command = "del /F /P";
+#ifdef WIN32     
+    std::string command = (GetFileAttributes((*it).c_str()) == FILE_ATTRIBUTE_DIRECTORY) ? "rd /Q \"" : "del /F /Q \"";
 #else
     std::string command = "rm -rf ";
 #endif
     command += *it;
+       command += "\" 2>NUL";
     system( command.c_str() );
   }
   _tmp_files.clear();
index 57aab2da23ea5fbc0c7bd9a5e527968c8454c6ee..1cb6de4935219fc7ffa3391d3dab3a05aa7d8549 100644 (file)
@@ -792,7 +792,7 @@ bool SALOMEDSImpl_Study::Impl_SaveAs(const std::string& aStudyUrl,
     size_t aLen = strlen(buffer);
     if (buffer[aLen-1] == '\n') buffer[aLen-1] = char(0);
 #ifdef WIN32
-    aCmd = "move /Y \"" + aStudyTmpDir + std::string(buffer) + "\" \"" + SALOMEDSImpl_Tool::GetDirFromPath(aStudyUrl) +"\"";
+    aCmd = "move /Y \"" + aStudyTmpDir + std::string(buffer) + "\" \"" + SALOMEDSImpl_Tool::GetDirFromPath(aStudyUrl) +"\" 2>NUL";
 #else
     aCmd = "mv -f \"" + aStudyTmpDir + std::string(buffer) + "\" \"" + SALOMEDSImpl_Tool::GetDirFromPath(aStudyUrl)+"\"";
 #endif