diff OrthancServer/OrthancInitialization.cpp @ 2933:4a38d7d4f0e0

new class: OrthancConfiguration
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Nov 2018 17:08:48 +0100
parents 40131f0c25b5
children 4767d36679ed
line wrap: on
line diff
--- a/OrthancServer/OrthancInitialization.cpp	Tue Nov 13 17:50:03 2018 +0100
+++ b/OrthancServer/OrthancInitialization.cpp	Tue Nov 27 17:08:48 2018 +0100
@@ -743,36 +743,10 @@
   }
 
 
-  std::string Configuration::InterpretRelativePath(const std::string& baseDirectory,
-                                                   const std::string& relativePath)
-  {
-    boost::filesystem::path base(baseDirectory);
-    boost::filesystem::path relative(relativePath);
-
-    /**
-       The following lines should be equivalent to this one: 
-
-       return (base / relative).string();
-
-       However, for some unknown reason, some versions of Boost do not
-       make the proper path resolution when "baseDirectory" is an
-       absolute path. So, a hack is used below.
-    **/
-
-    if (relative.is_absolute())
-    {
-      return relative.string();
-    }
-    else
-    {
-      return (base / relative).string();
-    }
-  }
-
   std::string Configuration::InterpretStringParameterAsPath(const std::string& parameter)
   {
     boost::recursive_mutex::scoped_lock lock(globalMutex_);
-    return InterpretRelativePath(defaultDirectory_.string(), parameter);
+    return SystemToolbox::InterpretRelativePath(defaultDirectory_.string(), parameter);
   }