]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMPackage.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / modelCDMPackage.cpp
index 78b6adf6ffdeb85c5c92e8d31094861e516021ad..66c5e22fdac803ba73e4cc655fe2a3e87cae16ec 100644 (file)
@@ -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 + "'.");