Mercurial > hg > orthanc-stone
changeset 2177:4d21befb1501
clarify DICOMweb version check
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Oct 2024 19:27:56 +0200 |
parents | c5f94c10cd61 |
children | 94df151039f1 |
files | Applications/StoneWebViewer/Plugin/Plugin.cpp |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/StoneWebViewer/Plugin/Plugin.cpp Tue Oct 22 21:59:25 2024 +0200 +++ b/Applications/StoneWebViewer/Plugin/Plugin.cpp Wed Oct 23 19:27:56 2024 +0200 @@ -28,6 +28,8 @@ #include <SystemToolbox.h> #include <Toolbox.h> +#include <boost/algorithm/string/predicate.hpp> + static const std::string STONE_WEB_VIEWER_ROOT = "/stone-webviewer"; // (*) static const char* CONFIG_SECTION = "StoneWebViewer"; @@ -61,7 +63,8 @@ } std::string version = info["Version"].asString(); - if (version.find("mainline") != 0) + if (version == "mainline" || + boost::starts_with(version, "mainline-")) // Allow DICOMweb versions such as "mainline-commitId" { std::vector<std::string> tokens; Orthanc::Toolbox::TokenizeString(tokens, version, '.');