# HG changeset patch # User Alain Mazy # Date 1602231410 -7200 # Node ID 8d2b29fd4de50579f3e65d60d29a0085560e8672 # Parent 67a7102d8d0f574bb1a13026ce660c8732e22ac7 cont diff -r 67a7102d8d0f -r 8d2b29fd4de5 Aws/AwsS3StoragePlugin.cpp --- a/Aws/AwsS3StoragePlugin.cpp Fri Oct 09 10:15:21 2020 +0200 +++ b/Aws/AwsS3StoragePlugin.cpp Fri Oct 09 10:16:50 2020 +0200 @@ -130,14 +130,17 @@ { return objectList[0].GetSize(); } - throw StoragePluginException(std::string("error while reading file ") + path_ + ": multiple objet with same name !"); + else if (objectList.size() > 1) + { + throw StoragePluginException(std::string("error while reading file ") + path_ + ": multiple objet with same name !"); + } + throw StoragePluginException(std::string("error while reading file ") + path_ + ": object not found !"); } else { throw StoragePluginException(std::string("error while reading file ") + path_ + ": " + result.GetError().GetExceptionName().c_str() + " " + result.GetError().GetMessage().c_str()); } } - virtual void Read(char* data, size_t size) { Aws::S3::Model::GetObjectRequest getObjectRequest;