MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / updateEntry

Method updateEntry

launcher/net/HttpMetaCache.cpp:141–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141auto HttpMetaCache::updateEntry(MetaEntryPtr stale_entry) -> bool
142{
143 if (!m_entries.contains(stale_entry->m_baseId)) {
144 qCCritical(taskHttpMetaCacheLogC) << "Cannot add entry with unknown base: " << stale_entry->m_baseId.toLocal8Bit();
145 return false;
146 }
147
148 if (stale_entry->m_stale) {
149 qCCritical(taskHttpMetaCacheLogC) << "Cannot add stale entry: " << stale_entry->getFullPath().toLocal8Bit();
150 return false;
151 }
152
153 m_entries[stale_entry->m_baseId].entry_list[stale_entry->m_relativePath] = stale_entry;
154 SaveEventually();
155
156 return true;
157}
158
159auto HttpMetaCache::evictEntry(MetaEntryPtr entry) -> bool
160{

Callers 1

finalizeCacheMethod · 0.80

Calls 2

getFullPathMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected