{
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();
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