mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-17 01:15:30 +00:00
sceNpTrophyRegisterContext verbose logging in TROPHY_ERROR_ILLEGAL_UPDATE error
Also use safer checking when creating trophy ctxt dir
This commit is contained in:
parent
80b4ac23e5
commit
ab02c56725
@ -340,6 +340,7 @@ error_code sceNpTrophyRegisterContext(ppu_thread& ppu, u32 context, u32 handle,
|
||||
TRPLoader trp(ctxt->trp_stream);
|
||||
if (!trp.LoadHeader())
|
||||
{
|
||||
sceNpTrophy.error("sceNpTrophyRegisterContext(): Failed to load trophy config header");
|
||||
return SCE_NP_TROPHY_ERROR_ILLEGAL_UPDATE;
|
||||
}
|
||||
|
||||
@ -362,6 +363,7 @@ error_code sceNpTrophyRegisterContext(ppu_thread& ppu, u32 context, u32 handle,
|
||||
}
|
||||
else if (!trp.ContainsEntry("TROPCONF.SFM"))
|
||||
{
|
||||
sceNpTrophy.error("sceNpTrophyRegisterContext(): Invalid/Incomplete trophy config");
|
||||
return SCE_NP_TROPHY_ERROR_ILLEGAL_UPDATE;
|
||||
}
|
||||
|
||||
@ -378,6 +380,7 @@ error_code sceNpTrophyRegisterContext(ppu_thread& ppu, u32 context, u32 handle,
|
||||
std::string trophyPath = "/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name;
|
||||
if (!trp.Install(trophyPath))
|
||||
{
|
||||
sceNpTrophy.error("sceNpTrophyRegisterContext(): Failed to install trophy context '%s' (%s)", trophyPath, fs::g_tls_error);
|
||||
return SCE_NP_TROPHY_ERROR_ILLEGAL_UPDATE;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ bool TRPLoader::Install(const std::string& dest, bool show)
|
||||
|
||||
const std::string& local_path = vfs::get(dest);
|
||||
|
||||
if (!fs::create_dir(local_path) && fs::g_tls_error != fs::error::exist)
|
||||
if (!fs::is_dir(local_path) && !fs::create_dir(local_path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user