# HG changeset patch # User Sebastien Jodogne # Date 1761815003 -3600 # Node ID ee52888346862e9013917b855f1aad8f6778a07a # Parent 1a95439d88bf49ce9b0353b8b4ee362acbc659a6 fix compatibility with older orthanc framework diff -r 1a95439d88bf -r ee5288834686 Framework/DownloadArea.cpp --- a/Framework/DownloadArea.cpp Tue Oct 07 10:22:20 2025 +0200 +++ b/Framework/DownloadArea.cpp Thu Oct 30 10:03:23 2025 +0100 @@ -57,7 +57,15 @@ if (!stream_.good()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_CannotWriteFile, std::string("Unable to write to ") + Orthanc::SystemToolbox::PathToUtf8(f.GetPath())); + std::string path; + +#if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 10) + path = Orthanc::SystemToolbox::PathToUtf8(f.GetPath()); +#else + path = f.GetPath(); +#endif + + throw Orthanc::OrthancException(Orthanc::ErrorCode_CannotWriteFile, std::string("Unable to write to ") + path); } }