changeset 684:96d8410c56cd

newlines
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 Jan 2014 16:58:03 +0100
parents 7bc5ccc550a1
children b01cc78caba4
files NEWS OrthancServer/main.cpp
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Jan 30 16:51:07 2014 +0100
+++ b/NEWS	Thu Jan 30 16:58:03 2014 +0100
@@ -3,6 +3,7 @@
 
 * Recover pixel data for more transfer syntaxes (notably JPEG)
 * Maintenance tool to recover DICOM files compressed by Orthanc
+* The newline characters in the configuration file are fixed for Linux
 
 
 Version 0.7.2 (2013/11/08)
--- 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;