From 867c12f07fe5b9e13d9898c752d0084080cf5c41 Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Tue, 9 Apr 2019 09:41:26 -0500 Subject: [PATCH] Fixed a bug in the cache. --- src/Cache.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Cache.cpp b/src/Cache.cpp index ffa670b0e..d7c3d85eb 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -127,15 +127,10 @@ void Cache::populate() const bf::path &p = dir->path(); if (bf::is_regular_file(p)) { - if (p.extension() == "") // need to decide whether objects should have an extension - { - lru.push_back(p.filename().string()); - auto last = lru.end(); - m_lru.insert(--last); - currentCacheSize += bf::file_size(*dir); - } - else - logger->log(LOG_WARNING, "Cache: found a file in the cache that does not belong '%s'", p.string().c_str()); + lru.push_back(p.filename().string()); + auto last = lru.end(); + m_lru.insert(--last); + currentCacheSize += bf::file_size(*dir); } else logger->log(LOG_WARNING, "Cache: found something in the cache that does not belong '%s'", p.string().c_str());