Log fs::g_tls_error on ACCESS_ERROR errors

This commit is contained in:
Eladash 2019-10-14 12:40:06 +03:00 committed by Ivan
parent 076a80d71e
commit 75ee668922
3 changed files with 6 additions and 6 deletions

View file

@ -322,13 +322,12 @@ s32 cellSysCacheClear()
std::string local_dir = vfs::get(cache->cache_path);
if (!fs::exists(local_dir) || !fs::is_dir(local_dir))
if (!fs::remove_all(local_dir, false))
{
cellSysutil.error("cellSysCacheClear(): failed to clear directory '%s' (%s)", cache->cache_path, fs::g_tls_error);
return CELL_SYSCACHE_ERROR_ACCESS_ERROR;
}
fs::remove_all(local_dir, false);
return CELL_SYSCACHE_RET_OK_CLEARED;
}