Less directories

This commit is contained in:
Alexey Milovidov 2024-04-27 19:05:58 +02:00
parent 39118ef461
commit 089cc25d9b
3 changed files with 7 additions and 5 deletions

View File

@ -249,7 +249,6 @@ void LocalServer::tryInitPath()
LOG_DEBUG(log, "Working directory created: {}", path);
}
fs::create_directories(config().getString("user_defined_path", fs::path(path) / "user_defined" / ""));
fs::create_directories(fs::path(path) / "data" / "");
fs::create_directories(fs::path(path) / "metadata" / "");

View File

@ -35,10 +35,12 @@ std::unique_ptr<IUserDefinedSQLObjectsStorage> createUserDefinedSQLObjectsStorag
}
return std::make_unique<UserDefinedSQLObjectsZooKeeperStorage>(global_context, config.getString(zookeeper_path_key));
}
String default_path = fs::path{global_context->getPath()} / "user_defined/";
String path = config.getString(disk_path_key, default_path);
return std::make_unique<UserDefinedSQLObjectsDiskStorage>(global_context, path);
else
{
String default_path = fs::path{global_context->getPath()} / "user_defined" / "";
String path = config.getString(disk_path_key, default_path);
return std::make_unique<UserDefinedSQLObjectsDiskStorage>(global_context, path);
}
}
}

View File

@ -5,6 +5,7 @@
namespace DB
{
class IUserDefinedSQLObjectsStorage;
std::unique_ptr<IUserDefinedSQLObjectsStorage> createUserDefinedSQLObjectsStorage(const ContextMutablePtr & global_context);