Mercurial > hg > orthanc
changeset 7048:e1cce5515153
multiple paths to configuration files can now be provided
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Tue, 11 Aug 2026 17:01:21 +0200 |
| parents | 667acdc1b2f2 |
| children | 4f42a9f8e078 |
| files | NEWS OrthancServer/Sources/OrthancConfiguration.cpp OrthancServer/Sources/main.cpp |
| diffstat | 3 files changed, 5 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Tue Aug 11 16:56:06 2026 +0200 +++ b/NEWS Tue Aug 11 17:01:21 2026 +0200 @@ -4,6 +4,7 @@ General ------- +* Multiple paths to configuration files can now be provided, instead of a single file or a single folder * Orthanc will now refuse to start if you have "AuthenticationEnabled" and "RemoteAccessAllowed" set to true and have not defined any users in "RegisteredUsers". * New values for "OverwriteInstances" configuration. In previous versions, this configuration
--- a/OrthancServer/Sources/OrthancConfiguration.cpp Tue Aug 11 16:56:06 2026 +0200 +++ b/OrthancServer/Sources/OrthancConfiguration.cpp Tue Aug 11 17:01:21 2026 +0200 @@ -693,8 +693,8 @@ { if (configurationPaths_.size() >= 2) { - LOG(WARNING) << "A plugin has called deprecated OrthancPluginGetConfigurationPath(), the results " - << "are unreliable because multiple configuration path were provided"; + LOG(WARNING) << "A plugin has called the deprecated OrthancPluginGetConfigurationPath() primitive, the results " + << "are unreliable because multiple configuration paths were provided"; } const boost::filesystem::path& first = configurationPaths_.front();
--- a/OrthancServer/Sources/main.cpp Tue Aug 11 16:56:06 2026 +0200 +++ b/OrthancServer/Sources/main.cpp Tue Aug 11 17:01:21 2026 +0200 @@ -2049,17 +2049,7 @@ } else if (argument[0] != '-') { - if (!configurationPaths.empty()) - { - LOG(ERROR) << "More than one configuration path were provided on the command line, aborting"; - return -1; - } - else - { - // Use the first argument that does not start with a "-" as - // the configuration file - - boost::filesystem::path configurationFile = SystemToolbox::PathFromUtf8(argument); + boost::filesystem::path configurationFile = SystemToolbox::PathFromUtf8(argument); // // TODO WHAT IS THE ENCODING? //#if defined(_WIN32) @@ -2068,8 +2058,7 @@ // configurationFileUtf8Str = std::string(argv[i]); //#endif - configurationPaths.push_back(configurationFile); - } + configurationPaths.push_back(configurationFile); } else if (argument == "--errors") {
