X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMPackage.cpp;h=66c5e22fdac803ba73e4cc655fe2a3e87cae16ec;hb=327c33758d25e6ff1f90f9ab74ea219eaed934a9;hp=78b6adf6ffdeb85c5c92e8d31094861e516021ad;hpb=eed967098aa87503c59d09c8d5c0dc87485698e2;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMPackage.cpp b/lib/creaDevManagerLib/modelCDMPackage.cpp index 78b6adf..66c5e22 100644 --- a/lib/creaDevManagerLib/modelCDMPackage.cpp +++ b/lib/creaDevManagerLib/modelCDMPackage.cpp @@ -244,7 +244,12 @@ bool modelCDMPackage::SetAuthors(const std::string& authors, std::string*& resul 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 + "'."); @@ -296,7 +301,12 @@ bool modelCDMPackage::SetVersion(const std::string& version, std::string*& resul 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 + "'."); @@ -342,7 +352,12 @@ bool modelCDMPackage::SetDescription(const std::string& description, 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 + "'.");