mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
deal with conflict
This commit is contained in:
parent
88128db26f
commit
bb12f7decc
@ -104,12 +104,8 @@ void registerDiskS3(DiskFactory & factory, bool global_skip_access_check)
|
|||||||
{
|
{
|
||||||
String endpoint = context->getMacros()->expand(config.getString(config_prefix + ".endpoint"));
|
String endpoint = context->getMacros()->expand(config.getString(config_prefix + ".endpoint"));
|
||||||
S3::URI uri(endpoint);
|
S3::URI uri(endpoint);
|
||||||
|
if(!uri.key.ends_with('/'))
|
||||||
if (uri.key.empty())
|
uri.key.push_back('/');
|
||||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "No key in S3 uri: {}", uri.uri.toString());
|
|
||||||
|
|
||||||
if (uri.key.back() != '/')
|
|
||||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "S3 path must ends with '/', but '{}' doesn't.", uri.key);
|
|
||||||
|
|
||||||
S3Capabilities s3_capabilities = getCapabilitiesFromConfig(config, config_prefix);
|
S3Capabilities s3_capabilities = getCapabilitiesFromConfig(config, config_prefix);
|
||||||
std::shared_ptr<S3ObjectStorage> s3_storage;
|
std::shared_ptr<S3ObjectStorage> s3_storage;
|
||||||
|
Loading…
Reference in New Issue
Block a user