mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Better processing of relative cache path
This commit is contained in:
parent
467ecf45e1
commit
c08e6d6c5f
@ -40,7 +40,10 @@ void registerDiskCache(DiskFactory & factory, bool /* global_skip_access_check *
|
||||
FileCacheSettings file_cache_settings;
|
||||
file_cache_settings.loadFromConfig(config, config_prefix);
|
||||
|
||||
auto cache_base_path = config.getString(config_prefix + ".path", fs::path(context->getPath()) / "disks" / name / "cache/");
|
||||
fs::path cache_base_path = config.getString(config_prefix + ".path", fs::path(context->getPath()) / "disks" / name / "cache/");
|
||||
if (cache_base_path.is_relative())
|
||||
cache_base_path = fs::path(context->getPath()) / "caches" / cache_base_path;
|
||||
|
||||
if (!fs::exists(cache_base_path))
|
||||
fs::create_directories(cache_base_path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user