MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / updateEntry

Method updateEntry

launcher/net/HttpMetaCache.cpp:137–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137auto HttpMetaCache::updateEntry(MetaEntryPtr stale_entry) -> bool
138{
139 if (!m_entries.contains(stale_entry->baseId)) {
140 qCritical() << "Cannot add entry with unknown base: " << stale_entry->baseId.toLocal8Bit();
141 return false;
142 }
143
144 if (stale_entry->stale) {
145 qCritical() << "Cannot add stale entry: " << stale_entry->getFullPath().toLocal8Bit();
146 return false;
147 }
148
149 m_entries[stale_entry->baseId].entry_list[stale_entry->relativePath] = stale_entry;
150 SaveEventually();
151
152 return true;
153}
154
155auto HttpMetaCache::evictEntry(MetaEntryPtr entry) -> bool
156{

Callers 1

finalizeCacheMethod · 0.80

Calls 2

getFullPathMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected