Update S3Common.cpp

This commit is contained in:
alexey-milovidov 2020-12-14 13:53:40 +03:00 committed by GitHub
parent 418c974eaf
commit 60efab623d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,7 +368,7 @@ namespace S3
throw Exception(
"Bucket name length is out of bounds in virtual hosted style S3 URI: " + bucket + " (" + uri.toString() + ")", ErrorCodes::BAD_ARGUMENTS);
if (uri.getPath().size() > 0)
if (!uri.getPath().empty())
{
/// Remove leading '/' from path to extract key.
key = uri.getPath().substr(1);