Fix calculation of reserve

This commit is contained in:
heckflosse
2019-06-04 17:52:39 +02:00
parent f9c44f2e47
commit df65774667

View File

@@ -386,7 +386,7 @@ void CacheManager::applyCacheSizeLimitation () const
return;
}
const std::size_t toDelete = files.size() - options.maxCacheEntries + options.maxCacheEntries * 100 / 5; // reserve 5% free cache space
const std::size_t toDelete = files.size() - options.maxCacheEntries + options.maxCacheEntries * 5 / 100; // reserve 5% free cache space
std::nth_element(
files.begin(),