Update registerDiskCache.cpp

This commit is contained in:
Kseniia Sumarokova 2023-04-16 21:00:17 +02:00 committed by GitHub
parent 8becddd400
commit b37dcaa3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ void registerDiskCache(DiskFactory & factory, bool /* global_skip_access_check *
if (file_cache_settings.base_path.empty())
file_cache_settings.base_path = fs::path(context->getPath()) / "disks" / name / "cache/";
else if (fs::path(file_cache_settings.base_path).is_relative())
file_cache_settings.base_path = fs::path(context->getPath()) / "caches" / cache_base_path;
file_cache_settings.base_path = fs::path(context->getPath()) / "caches" / file_cache_settings.base_path;
auto cache = FileCacheFactory::instance().getOrCreate(name, file_cache_settings);
auto disk = disk_it->second;