Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancWebDav.cpp @ 4554:efd90f778cd2 db-changes
simplification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 03 Mar 2021 16:31:57 +0100 |
parents | 350a22c094f2 |
children | 94147ce2f097 |
comparison
equal
deleted
inserted
replaced
4552:beb8ba8a0b12 | 4554:efd90f778cd2 |
---|---|
266 virtual void Visit(const std::string& publicId, | 266 virtual void Visit(const std::string& publicId, |
267 const std::string& instanceId /* unused */, | 267 const std::string& instanceId /* unused */, |
268 const DicomMap& mainDicomTags, | 268 const DicomMap& mainDicomTags, |
269 const Json::Value* dicomAsJson /* unused (*) */) ORTHANC_OVERRIDE | 269 const Json::Value* dicomAsJson /* unused (*) */) ORTHANC_OVERRIDE |
270 { | 270 { |
271 ServerIndex::ExpandResourceOperation operation(publicId, level_); | 271 Json::Value resource; |
272 context_.GetIndex().Apply(operation); | 272 if (context_.GetIndex().ExpandResource(resource, publicId, level_)) |
273 | |
274 if (operation.IsFound()) | |
275 { | 273 { |
276 if (success_) | 274 if (success_) |
277 { | 275 { |
278 success_ = false; // Two matches => Error | 276 success_ = false; // Two matches => Error |
279 } | 277 } |
280 else | 278 else |
281 { | 279 { |
282 target_ = operation.GetResource().toStyledString(); | 280 target_ = resource.toStyledString(); |
283 | 281 |
284 // Replace UNIX newlines with DOS newlines | 282 // Replace UNIX newlines with DOS newlines |
285 boost::replace_all(target_, "\n", "\r\n"); | 283 boost::replace_all(target_, "\n", "\r\n"); |
286 | 284 |
287 success_ = true; | 285 success_ = true; |