X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMLibrary.cpp;h=7b99318b58333425375949bdd6d8b689dd4d5fe8;hb=327c33758d25e6ff1f90f9ab74ea219eaed934a9;hp=58cc8929b669dea3741d889e30b937d297f34fae;hpb=eed967098aa87503c59d09c8d5c0dc87485698e2;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMLibrary.cpp b/lib/creaDevManagerLib/modelCDMLibrary.cpp index 58cc892..7b99318 100644 --- a/lib/creaDevManagerLib/modelCDMLibrary.cpp +++ b/lib/creaDevManagerLib/modelCDMLibrary.cpp @@ -181,7 +181,11 @@ bool modelCDMLibrary::SetNameLibrary(const std::string& fileName, std::string*& 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 + "'.");