changeset 330:d89da90a262b

fix compatibility with 1.12.8
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 14 Jun 2025 09:09:56 +0200 (3 weeks ago)
parents feb20efdf4bf
children 62ef442b9b3f
files Plugin/Cache/CacheManager.cpp
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/Cache/CacheManager.cpp	Tue Apr 15 13:46:42 2025 +0200
+++ b/Plugin/Cache/CacheManager.cpp	Sat Jun 14 09:09:56 2025 +0200
@@ -467,8 +467,14 @@
     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));
+      std::unique_ptr<Orthanc::IMemoryBuffer> buffer;
+
+#  if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 8)
+      pimpl_->storage_.ReadWhole(uuid, Orthanc::FileContentType_Unknown);
+#  else
+      pimpl_->storage_.Read(uuid, Orthanc::FileContentType_Unknown);
+#  endif
+
       buffer->MoveToString(content);
 #else
       pimpl_->storage_.Read(content, uuid, Orthanc::FileContentType_Unknown);