# HG changeset patch # User Alain Mazy # Date 1602231321 -7200 # Node ID 67a7102d8d0f574bb1a13026ce660c8732e22ac7 # Parent 968eb1c78aed08050f6aee8a75d3fbc9b991ff87 displays an error if RootPath starts with a '/'. S3 plugin was not able to read the file back. diff -r 968eb1c78aed -r 67a7102d8d0f Common/StoragePlugin.cpp --- a/Common/StoragePlugin.cpp Mon Sep 07 14:12:49 2020 +0200 +++ b/Common/StoragePlugin.cpp Fri Oct 09 10:15:21 2020 +0200 @@ -325,6 +325,13 @@ } objectsRootPath = pluginSection.GetStringValue("RootPath", std::string()); + + if (objectsRootPath.size() >= 1 && objectsRootPath[0] == '/') + { + OrthancPlugins::LogError(std::string(StoragePluginFactory::GetStoragePluginName()) + ": The RootPath shall not start with a '/': " + objectsRootPath); + return -1; + } + plugin->SetRootPath(objectsRootPath); if (pluginSection.IsSection(ENCRYPTION_SECTION))