cleanup
Fix formatting and fix a typo in the return code check Signed-off-by: Soup <43444191+Soup-64@users.noreply.github.com>
This commit is contained in:
parent
b9a1fa3645
commit
0c90530f88
3 changed files with 13 additions and 6 deletions
|
@ -166,9 +166,10 @@ auto HttpMetaCache::evictEntry(MetaEntryPtr entry) -> bool
|
|||
return true;
|
||||
}
|
||||
|
||||
bool HttpMetaCache::evictAll()
|
||||
//returns true on success, false otherwise
|
||||
auto HttpMetaCache::evictAll() -> bool
|
||||
{
|
||||
bool ret;
|
||||
bool ret = true;
|
||||
for (QString& base : m_entries.keys()) {
|
||||
EntryMap& map = m_entries[base];
|
||||
qCDebug(taskHttpMetaCacheLogC) << "Evicting base" << base;
|
||||
|
@ -177,7 +178,8 @@ bool HttpMetaCache::evictAll()
|
|||
qCWarning(taskHttpMetaCacheLogC) << "Unexpected missing cache entry" << entry->m_basePath;
|
||||
}
|
||||
map.entry_list.clear();
|
||||
ret = FS::deletePath(map.base_path);
|
||||
//AND all return codes together so the result is true iff all runs of deletePath() are true
|
||||
ret &= FS::deletePath(map.base_path);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue