mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
invalidate vbdri cached entry when a write fails
This commit is contained in:
parent
75cae95509
commit
6e0b6d2d0a
@ -285,6 +285,11 @@ int WriteVBDRIFile(VirtualFile* vfile, const void* buffer, u64 offset, u64 count
|
|||||||
if ((is_tickdb ? AddTicketToDB(PART_PATH, title_ids + vfile->offset * 8, (Ticket*)(void*)cached_entry, true) :
|
if ((is_tickdb ? AddTicketToDB(PART_PATH, title_ids + vfile->offset * 8, (Ticket*)(void*)cached_entry, true) :
|
||||||
AddTitleInfoEntryToDB(PART_PATH, title_ids + vfile->offset * 8, (TitleInfoEntry*)(void*)cached_entry, true)) != 0) {
|
AddTitleInfoEntryToDB(PART_PATH, title_ids + vfile->offset * 8, (TitleInfoEntry*)(void*)cached_entry, true)) != 0) {
|
||||||
if (resize) vfile->size = tick_info[vfile->offset].size;
|
if (resize) vfile->size = tick_info[vfile->offset].size;
|
||||||
|
if (is_tickdb) {
|
||||||
|
free(cached_entry);
|
||||||
|
cached_entry = NULL;
|
||||||
|
}
|
||||||
|
cache_index = -1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user