Mercurial > hg > orthanc
diff OrthancServer/OrthancInitialization.cpp @ 2938:d658f5785b7b
merge
author | am@osimis.io |
---|---|
date | Wed, 28 Nov 2018 14:37:17 +0100 |
parents | 4a38d7d4f0e0 |
children | 4767d36679ed |
line wrap: on
line diff
--- a/OrthancServer/OrthancInitialization.cpp Wed Nov 28 14:36:33 2018 +0100 +++ b/OrthancServer/OrthancInitialization.cpp Wed Nov 28 14:37:17 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); }