added chech that root starts with '/' in zookeeper config file [#CLICKHOUSE-3031]

This commit is contained in:
Nikolai Kochetov 2017-08-30 21:04:47 +03:00 committed by alexey-milovidov
parent 871a7cabc6
commit 1e08db938d

View File

@ -151,7 +151,12 @@ struct ZooKeeperArgs
hosts += host;
}
hosts += root;
if (!root.empty())
{
if (root.front() != '/')
throw KeeperException(std::string("Root path in config file should starts with '/', but got ") + root);
hosts += root;
}
}
std::string hosts;