X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FCore%2FCommunicationProtocol.cxx;h=aaee92b1c16073fb9e3e8eaef4657cc9e3cf11a8;hb=cb7f594cea9015e986cafdeccf43b22742bf405e;hp=1e50417926fd6fb98fd06eb54c8fdcf12c5618c0;hpb=32d6088d027af13352bf6a71c47bcd14505a743f;p=tools%2Flibbatch.git diff --git a/src/Core/CommunicationProtocol.cxx b/src/Core/CommunicationProtocol.cxx index 1e50417..aaee92b 100644 --- a/src/Core/CommunicationProtocol.cxx +++ b/src/Core/CommunicationProtocol.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -123,17 +123,29 @@ namespace Batch { string CommunicationProtocol::getRemoveSubCommand(const string & path) const { +#ifdef WIN32 + return string("del /s ") + path; +#else return string("rm ") + path; +#endif } string CommunicationProtocol::getRemoveDirectorySubCommand(const string & path) const { +#ifdef WIN32 + return string("rd /s /q ") + path; +#else return string("rm -fR ") + path; +#endif } string CommunicationProtocol::getMakeDirectorySubCommand(const string & path) const { +#ifdef WIN32 + return string("md ") + path; +#else return string("mkdir -p ") + path; +#endif } int CommunicationProtocol::removeFile(const std::string & path,