未验证 提交 9e14603a 编写于 作者: A alexey-milovidov 提交者: GitHub

Update DatabaseFactory.cpp

上级 a6222082
......@@ -36,18 +36,18 @@ namespace ErrorCodes
DatabasePtr DatabaseFactory::get(
const String & database_name, const String & metadata_path, const ASTStorage * engine_define, Context & context)
{
bool create = false;
bool created = false;
try
{
create = Poco::File(metadata_path).createDirectory();
created = Poco::File(metadata_path).createDirectory();
return getImpl(database_name, metadata_path, engine_define, context);
}
catch (...)
{
Poco::File metadata_dir(metadata_path);
if (create && metadata_dir.exists())
if (created && metadata_dir.exists())
metadata_dir.remove(true);
throw;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册