Make gamedata installation atomic as real PS3

This commit is contained in:
Eladash 2021-03-12 16:25:03 +02:00 committed by Ivan
parent a9b0d25c01
commit d7b4753007
6 changed files with 123 additions and 11 deletions

View file

@ -101,6 +101,13 @@ error_code sys_overlay_load_module_by_fd(vm::ptr<u32> ovlmid, u32 fd, u64 offset
return CELL_EBADF;
}
std::lock_guard lock(file->mp->mutex);
if (!file->file)
{
return CELL_EBADF;
}
return overlay_load_module(ovlmid, fmt::format("%s_x%x", file->name.data(), offset), flags, entry, lv2_file::make_view(file, offset));
}