comparison OrthancServer/ServerContext.cpp @ 1550:2c7d5eb588e6

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 17 Aug 2015 15:57:44 +0200
parents e5e975e9b738
children 0c29ebe80ac9
comparison
equal deleted inserted replaced
1549:e5e975e9b738 1550:2c7d5eb588e6
343 FileInfo attachment; 343 FileInfo attachment;
344 if (!index_.LookupAttachment(attachment, instancePublicId, content)) 344 if (!index_.LookupAttachment(attachment, instancePublicId, content))
345 { 345 {
346 throw OrthancException(ErrorCode_InternalError); 346 throw OrthancException(ErrorCode_InternalError);
347 } 347 }
348 348
349 StorageAccessor accessor(area_); 349 if (uncompressIfNeeded)
350 accessor.Read(result, attachment); 350 {
351 StorageAccessor accessor(area_);
352 accessor.Read(result, attachment);
353 }
354 else
355 {
356 // Do not interpret the content of the storage area, return the
357 // raw data
358 area_.Read(result, attachment.GetUuid(), content);
359 }
351 } 360 }
352 361
353 362
354 IDynamicObject* ServerContext::DicomCacheProvider::Provide(const std::string& instancePublicId) 363 IDynamicObject* ServerContext::DicomCacheProvider::Provide(const std::string& instancePublicId)
355 { 364 {