std::vector<std::string> words;
CDMUtilities::splitter::split(words, authors, "/\\\"\n", CDMUtilities::splitter::no_empties);
std::string authorsReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
authorsReal += "," + words[i];
}
in.close();
out.close();
//delete old file and rename new file
+#ifdef _WIN32
+ std::string renameCommand = "move /Y \"" + pathHeader + ".tmp\" \"" + pathHeader + "\"";
+#else
std::string renameCommand = "mv \"" + pathHeader + ".tmp\" \"" + pathHeader + "\"";
+#endif
+
if(system(renameCommand.c_str()))
{
result = new std::string("An error occurred while running '" + renameCommand + "'.");
std::vector<std::string> words;
CDMUtilities::splitter::split(words, categories, "\"\\/", CDMUtilities::splitter::no_empties);
std::string catsReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
catsReal += "," + words[i];
}
in.close();
out.close();
//delete old file and rename new file
+#ifdef _WIN32
+ std::string renameCommand = "move /Y \"" + pathHeader + ".tmp\" \"" + pathHeader + "\"";
+#else
std::string renameCommand = "mv \"" + pathHeader + ".tmp\" \"" + pathHeader + "\"";
+#endif
+
if(system(renameCommand.c_str()))
{
result = new std::string("An error occurred while running '" + renameCommand + "'.");
std::vector<std::string> words;
CDMUtilities::splitter::split(words, description, "\"\n\\/", CDMUtilities::splitter::no_empties);
std::string descReal = words[0];
- for (int i = 1; i < words.size(); i++)
+ for (int i = 1; i < (int)(words.size()); i++)
{
descReal += "-" + words[i];
}
in.close();
out.close();
//delete old file and rename new file
+#ifdef _WIN32
+ std::string renameCommand = "move /Y \"" + pathHeader + ".tmp\" \"" + pathHeader + "\"";
+#else
std::string renameCommand = "mv \"" + pathHeader + ".tmp\" \"" + pathHeader + "\"";
+#endif
if(system(renameCommand.c_str()))
{
result = new std::string("An error occurred while running '" + renameCommand + "'.");