diff OrthancServer/main.cpp @ 684:96d8410c56cd

newlines
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 Jan 2014 16:58:03 +0100
parents 5425bb6f1ea5
children b01cc78caba4
line wrap: on
line diff
--- a/OrthancServer/main.cpp	Thu Jan 30 16:51:07 2014 +0100
+++ b/OrthancServer/main.cpp	Thu Jan 30 16:58:03 2014 +0100
@@ -285,6 +285,11 @@
       std::string configurationSample;
       GetFileResource(configurationSample, EmbeddedResources::CONFIGURATION_SAMPLE);
 
+#if defined(_WIN32)
+      // Replace UNIX newlines with DOS newlines 
+      boost::replace_all(configurationSample, "\n", "\r\n");
+#endif
+
       std::string target = std::string(argv[i]).substr(9);
       std::ofstream f(target.c_str());
       f << configurationSample;