Description: Fix compatibility with Orthanc framework 1.9.0
Author: Sebastien Jodogne <s.jodogne@orthanc-labs.com>
Forwarded: yes
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: OrthancWebViewer-2.7/Plugin/Cache/CacheManager.cpp
===================================================================
--- OrthancWebViewer-2.7.orig/Plugin/Cache/CacheManager.cpp
+++ OrthancWebViewer-2.7/Plugin/Cache/CacheManager.cpp
@@ -475,7 +475,14 @@ namespace OrthancPlugins
     bool ok;
     try
     {
+#if defined(ORTHANC_FRAMEWORK_VERSION_IS_ABOVE) && ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 9, 0) 
+      std::unique_ptr<Orthanc::IMemoryBuffer> buffer(
+        pimpl_->storage_.Read(uuid, Orthanc::FileContentType_Unknown));
+      buffer->MoveToString(content);
+#else
       pimpl_->storage_.Read(content, uuid, Orthanc::FileContentType_Unknown);
+#endif
+      
       ok = (content.size() == size);
     }
     catch (std::runtime_error&)
