X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMApplication.cpp;h=c77f3be7f9471511b915aafb9aebc6a0b6f5251e;hb=327c33758d25e6ff1f90f9ab74ea219eaed934a9;hp=40fb8105b12dbb270f7e2704eb9cd5e7f95a7622;hpb=eed967098aa87503c59d09c8d5c0dc87485698e2;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMApplication.cpp b/lib/creaDevManagerLib/modelCDMApplication.cpp index 40fb810..c77f3be 100644 --- a/lib/creaDevManagerLib/modelCDMApplication.cpp +++ b/lib/creaDevManagerLib/modelCDMApplication.cpp @@ -206,7 +206,12 @@ bool modelCDMApplication::SetExecutableName(const std::string& fileName, std::st in.close(); out.close(); //delete old file and rename new file +#ifdef _WIN32 + std::string renameCommand = "move /Y \"" + this->path + CDMUtilities::SLASH + "CMakeLists.txt.tmp\" \"" + this->path + CDMUtilities::SLASH + "CMakeLists.txt\""; +#else std::string renameCommand = "mv \"" + this->path + CDMUtilities::SLASH + "CMakeLists.txt.tmp\" \"" + this->path + CDMUtilities::SLASH + "CMakeLists.txt\""; +#endif + if(system(renameCommand.c_str())) { result = new std::string("An error occurred while running '" + renameCommand + "'.");