From bc66f4540a4eda36e8700d55ef22030abf98a021 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 28 Feb 2019 20:10:53 +0300 Subject: [PATCH] Remove unnecessary trace from console. --- src/Container/Container_i.cxx | 5 +++-- src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index d34b36ba8..92db1e0ad 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -1853,12 +1853,13 @@ void Engines_Container_i::clearTemporaryFiles() { std::list::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(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index 57aab2da2..1cb6de493 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -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 -- 2.39.2