mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 03:42:48 +00:00
[IO] versionId extraction simplified.
Reducing cognitive load.
This commit is contained in:
parent
679abaafdc
commit
7b35c79b04
@ -782,15 +782,12 @@ namespace S3
|
|||||||
|
|
||||||
// Extract object version ID from query string.
|
// Extract object version ID from query string.
|
||||||
{
|
{
|
||||||
|
version_id = "";
|
||||||
const String version_key = "versionId=";
|
const String version_key = "versionId=";
|
||||||
const auto query_string = uri.getQuery();
|
const auto query_string = uri.getQuery();
|
||||||
|
|
||||||
auto start = query_string.rfind(version_key);
|
auto start = query_string.rfind(version_key);
|
||||||
if (start == std::string::npos)
|
if (start != std::string::npos)
|
||||||
{
|
|
||||||
version_id = "";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
start += version_key.length();
|
start += version_key.length();
|
||||||
start = start == std::string::npos ? query_string.length() : start + 1;
|
start = start == std::string::npos ? query_string.length() : start + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user