cellGameContentPermit workaround

This commit is contained in:
Nekotekina 2018-03-12 19:07:27 +03:00
parent ba54f7ae39
commit 817dfe8651
1 changed files with 5 additions and 6 deletions

View File

@ -402,18 +402,17 @@ error_code cellGameContentPermit(vm::ptr<char[CELL_GAME_PATH_MAX]> contentInfoPa
// Make temporary directory persistent
const auto vdir = vfs::get(dir);
if (fs::exists(vdir))
{
fmt::throw_exception("cellGameContentPermit(): epic fail: directory '%s' already exists", dir);
}
if (fs::rename(prm->temp, vdir, false))
{
cellGame.success("cellGameContentPermit(): directory '%s' has been created", dir);
}
else
{
fmt::throw_exception("cellGameContentPermit(): failed to initialize directory '%s'", dir);
cellGame.error("cellGameContentPermit(): failed to initialize directory '%s' (%s)", dir, fs::g_tls_error);
strcpy_trunc(*contentInfoPath, dir);
strcpy_trunc(*usrdirPath, dir + "/USRDIR");
verify(HERE), fxm::remove<content_permission>();
return CELL_OK;
}
// Create PARAM.SFO