| 560 | } |
| 561 | |
| 562 | void GameList::LoadCache() |
| 563 | { |
| 564 | const std::string cache_filename(GetCacheFilename()); |
| 565 | auto stream = FileSystem::OpenManagedCFile(cache_filename.c_str(), "rb"); |
| 566 | if (!stream) |
| 567 | return; |
| 568 | |
| 569 | if (!LoadEntriesFromCache(stream.get())) |
| 570 | { |
| 571 | Console.Warning("Deleting corrupted cache file '%s'", cache_filename.c_str()); |
| 572 | stream.reset(); |
| 573 | s_cache_map.clear(); |
| 574 | DeleteCacheFile(); |
| 575 | return; |
| 576 | } |
| 577 | } |
| 578 | |
| 579 | bool GameList::OpenCacheForWriting() |
| 580 | { |