diff --git a/evidence/esde-folder-names/capture.json b/evidence/esde-folder-names/capture.json new file mode 100644 index 0000000..af0a5fd --- /dev/null +++ b/evidence/esde-folder-names/capture.json @@ -0,0 +1,32 @@ +{ + "step": "esde-folder-names", + "recorded": "2026-10-17T23:18:12Z", + "console_run": "", + "revision": "the commits this record lands with (content folders as ES-DE names them; a cartridge system's archives; ES-DE's first start)", + "command": "tools/run-title.sh --no-build --no-deploy --home-launch --watch 30; tools/run-title.sh --no-build --no-deploy --picker-test=300:es-de --frontend-capture=25,40 --watch 60; FTP reads of content/, playlists/, config/ and es-de/ES-DE/custom_systems/es_systems.xml", + "raw_capture": "klog/esde-folder-names/record.txt", + "raw_lines": 20, + "raw_bytes": 2224, + "lines": [ + "Console: the owner's base PS5 (1440p, 120 Hz, VRR), a fresh install (no config/frontend.cfg), 325 of the owner's game backups in 34 ES-DE folders, 2026-10-17.", + "Seeded as an earlier build left it: content/Sega - Dreamcast (a placeholder; no dreamcast folder), content/Nintendo - Game Boy (a placeholder; gb held 10 backups), content/Sony - PlayStation (a placeholder; psx held 10), playlists/Nintendo - Game Boy.lpl naming the placeholder, config/mGBA/Nintendo - Game Boy.opt.", + "Home-screen launch, build identity 02db7d47f5efd5e42dc17f121cd19125fa99a09ed80aeaae5786494d68b8f54e:", + " startup: system folders renamed as ES-DE names them = 3", + " startup: system folders made in content = 12", + " frontend: mode '', test run 0, picker test 0, picker 1, es-de 1, remembered ask, L1 0 -> picker", + " EXEC /app0/picker/picker.bin; [Frontend Picker] starts", + "After: no Sega - Dreamcast, Nintendo - Game Boy or Sony - PlayStation folder; dreamcast 1 file, gb 11, psx 11.", + " playlist: \"scan_content_dir\": \"/app0/content/gb\", \"path\": \"/app0/content/gb/placeholder-a.gb\"", + " config/mGBA/gb.opt", + "ES-DE's first start on that build (its folder not made yet):", + " start: library from RetroArch's playlists: 28 systems, 255 games (0 with ES-DE's details kept), 33 cores, 0 favourites, 0 played, 29 failures", + " start: systems written -1", + "ES-DE's second start (ES-DE had made its folder by then): 28 systems, 255 games, 0 failures; systems written 28.", + "ES-DE's first start after the fixes (build identity 22b5d1229342dc01e94a5b023dd9534b17836c1b70f038246a92ed5f811a9c61, ES-DE's folder moved aside):", + " start: library from RetroArch's playlists: 34 systems, 317 games (0 with ES-DE's details kept), 33 cores, 0 favourites, 0 played, 0 failures", + " start: systems written 34", + "es_systems.xml: 34 systems, every path /app0/content/: amiga atari2600 atari5200 atari7800 atarijaguar atarilynx c64 dreamcast fds gamegear gb gba gbc gc genesis mastersystem n3ds n64 nds nes ngp ngpc pcengine pokemini psp psx sega32x sg-1000 snes supergrafx virtualboy wii wonderswan wonderswancolor", + "Host: python3 -m unittest tests.test_ps5_library tests.test_esde_library: OK; each new case fails without its fix.", + "Test files removed from the console afterwards; the owner's backups kept." + ] +} diff --git a/evidence/esde-folder-names/expectation.json b/evidence/esde-folder-names/expectation.json new file mode 100644 index 0000000..78746e9 --- /dev/null +++ b/evidence/esde-folder-names/expectation.json @@ -0,0 +1,16 @@ +{ + "step": "esde-folder-names", + "note": "Content folders take ES-DE's system names; folders earlier builds named as RetroArch does are renamed or merged with their playlists and per-folder settings; a fresh install starts in the picker; ES-DE's first start writes its library (it wrote nothing before: its own folder did not exist yet) and finds archived games of systems whose cores also take discs.", + "must_contain": [ + "startup: system folders renamed as ES-DE names them = 3", + "picker 1, es-de 1, remembered ask, L1 0 -> picker", + "\"path\": \"/app0/content/gb/placeholder-a.gb\"", + "config/mGBA/gb.opt", + "29 failures", + "34 systems, 317 games (0 with ES-DE's details kept), 33 cores, 0 favourites, 0 played, 0 failures", + "start: systems written 34", + "every path /app0/content/" + ], + "must_not_contain": [], + "human_check": "" +} diff --git a/frontends/es-de/ps5/library_ps5.cpp b/frontends/es-de/ps5/library_ps5.cpp index af060eb..a42c529 100644 --- a/frontends/es-de/ps5/library_ps5.cpp +++ b/frontends/es-de/ps5/library_ps5.cpp @@ -306,7 +306,11 @@ extern "C" int ps5_esde_write_library_to(const struct ps5_esde_library_paths *pa } const std::map reference = read_reference(paths->reference); const std::string data = paths->data; - /* Folders 0777 whatever the umask, for FTP's reach (src/permissions_ps5.cpp). */ + /* Folders 0777 whatever the umask, for FTP's reach (src/permissions_ps5.cpp). ES-DE makes + * its own folder only once it runs, after this: on a fresh install's first start every + * write below failed and ES-DE showed no games, so the folder is made here first. */ + mkdir(data.c_str(), 0777); + chmod(data.c_str(), 0777); for (const char *folder : {"/custom_systems", "/gamelists"}) { mkdir((data + folder).c_str(), 0777); diff --git a/tests/esde_library_test.cpp b/tests/esde_library_test.cpp index a7662b5..2cd6814 100644 --- a/tests/esde_library_test.cpp +++ b/tests/esde_library_test.cpp @@ -216,10 +216,10 @@ int main(int argc, char **argv) .value()) .empty()); /* Issue 33: ES-DE's ROM folder is the title's content folder, from the very first - * start (no settings file yet), not its own ~/ROMs (/app0/es-de/ROMs). */ + * start (no settings file yet), not its own ~/ROMs (/app0/es-de/ROMs). On a fresh + * install ES-DE's own folder does not exist yet either: the library makes it. */ { const std::string first = dir + "/first", rom = dir + "/content-first"; - mkdir(first.c_str(), 0755); mkdir(rom.c_str(), 0755); const char *const roots[] = {rom.c_str(), nullptr}; const struct ps5_esde_library_paths fresh = { @@ -233,6 +233,8 @@ int main(int argc, char **argv) file.find_child_by_attribute("string", "name", name).attribute("value").value()); }; ps5_esde_write_library_to(&fresh, summary, sizeof(summary)); + assert(std::string(summary).find(", 0 failures") != std::string::npos); + assert(pugi::xml_document().load_file((first + "/custom_systems/es_systems.xml").c_str())); assert(value("ROMDirectory") == rom && value("MediaDirectory") == media); /* ES-DE's own default, as an older start left it: replaced. */ write_text(first + "/settings/es_settings.xml",