Files
AnyPS5/core/libs/tests/GuestDownloadDataMount.cpp
T
LeandroLP23andClaude Opus 5.5 84fa55722d fix(kernel): create /download0 at start-up when the title declares download data
On the console a title whose param.json declares downloadDataSize finds
/download0 mounted from the start. The host directory was only created
by sceAppContentDownloadDataGetAvailableSpaceKb, so a title that opens
files there directly got ENOENT. libkernel now creates it when it loads,
reading only the run directory's param.json, without resolving guest
paths, so the libc path root is still fixed at first use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:18:22 +02:00

15 lines
504 B
C++

#include "prx/libkernel/AppMetadata/include/AppMetadata.hpp"
#include <cstdlib>
#include <cstring>
#include <filesystem>
static void Require(bool value) { if (!value) std::abort(); }
int main(int argc, char** argv) {
Require(argc == 2);
const bool declared = std::strcmp(argv[1], "declared") == 0;
Require(std::filesystem::is_directory("download0") == declared);
Require(std::strcmp(GetAppTitleId_nid_postfix().value, "PPSA00000") == 0);
std::filesystem::remove_all("download0");
}