Mercurial > hg > orthanc
comparison OrthancServer/OrthancInitialization.cpp @ 428:6f00823be12a
explanations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 08 May 2013 13:06:04 +0200 |
parents | 9d2e1009076a |
children | 09b3c6265a94 |
comparison
equal
deleted
inserted
replaced
427:9d2e1009076a | 428:6f00823be12a |
---|---|
282 | 282 |
283 std::string InterpretStringParameterAsPath(const std::string& parameter) | 283 std::string InterpretStringParameterAsPath(const std::string& parameter) |
284 { | 284 { |
285 boost::mutex::scoped_lock lock(globalMutex_); | 285 boost::mutex::scoped_lock lock(globalMutex_); |
286 | 286 |
287 /** | |
288 The following lines should be equivalent to this one: | |
289 | |
290 return (defaultDirectory_ / parameter).string(); | |
291 | |
292 However, for some unknown reason, some versions of Boost do not | |
293 make the proper path resolution when "defaultDirectory_" is an | |
294 absolute path. So, a hack is used below. | |
295 **/ | |
296 | |
287 boost::filesystem::path p(parameter); | 297 boost::filesystem::path p(parameter); |
288 | 298 |
289 if (p.is_absolute()) | 299 if (p.is_absolute()) |
290 { | 300 { |
291 return p.string(); | 301 return p.string(); |