Update FileCache.cpp

This commit is contained in:
Kseniia Sumarokova 2022-08-11 22:15:33 +02:00 committed by GitHub
parent 687ea5dd76
commit 004a4d4947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1044,8 +1044,13 @@ void FileCache::loadCacheInfoIntoMemory(std::lock_guard<std::mutex> & cache_lock
fs::directory_iterator key_it{key_prefix_it->path()};
for (; key_it != fs::directory_iterator(); ++key_it)
{
key = Key(unhexUInt<UInt128>(key_it->path().filename().string().data()));
if (!key_it->is_directory())
{
LOG_WARNING(log, "Unexpected file: {}. Expected a directory", key_it->path().string());
continue;
}
key = Key(unhexUInt<UInt128>(key_it->path().filename().string().data()));
fs::directory_iterator offset_it{key_it->path()};
for (; offset_it != fs::directory_iterator(); ++offset_it)
{