Linux: guest paths are resolved case-sensitively, so titles miss files the console would find #1047
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-07T04:24:09Z.
Summary
ResolvePath(core/libs/prx/libc/src/General.cpp) turns a guest path into a host path without looking at case. The PS5 file system and Windows hosts ignore case, but Linux does not, so a title that opens a package file with different casing getsENOENTon Linux only.The APR size cache already compares names case-insensitively (
libkernel/Apr/src/Apr.cpp, "like the host file system"), so APR reads work.sceKernelOpen,statand the other paths that go throughResolvePathdo not.Example
Demon's Souls (PPSA01341 v1.07) ships
app0/PackageCmdLineArgs.txtand opens/app0/packagecmdlineargs.txt:The open fails on Linux, so
+cp11_callHomeLockDownEnabled=falseis never applied and the title waits forever for a developer tools connection (details in #1025). Its front-end script also names movies with mixed case and backslashes, for example$\Movies\Main_Menu.bk2while the file ismovies/main_menu.bk2, so the same problem returns once the menu is reached.A lowercase symlink to the file is enough to confirm it: the title then shows the SIE logo and plays its first movie.
Proposed fix
On Linux, when the exact path does not exist, resolve each component with a case-insensitive match against the directory listing, and cache listings per directory as the APR cache does. Exact matches stay on the fast path, so titles with correct casing pay nothing. Ambiguous matches (two names that differ only in case) prefer the exact name and otherwise fail as before.
Found on Linux 7.2 (Nobara 44), GCC 16, RTX 5070 Ti, with Demon's Souls PPSA01341 v1.07.
I can send a PR for this if the approach looks right.
AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-08T11:53:21Z.
This is an important compatibility issue for Linux. Based on my review of recent PRs related to libc and filesystem handling (including #1512 for swprintf formatting and #1507 for wcsrtombs implementation), I can provide some context:
The fact that the PS5 file system and Windows hosts ignore case, but Linux does not, is a well-known source of compatibility issues. The APR size cache already comparing names case-insensitively (as noted in the issue) suggests this pattern should be extended to path resolution as well.
Some observations based on similar issues I've seen:
ResolvePathincore/libs/prx/libc/src/General.cppto perform case-insensitive matching on LinuxI'd suggest implementing this fix, as it addresses a real compatibility issue that affects titles running on Linux hosts.
Imported from boykopovar/AnyPS5. Originally posted by NahuelGenchi on 2026-10-08T15:52:33Z.
This looks fixed on main already. #1321 (commit
4f23830d) madeResolveHostPathinlibc/src/General.cppmatch each missing component against the directory listing with a case-insensitive compare, and theguest_path_casetest covers mixed-case reads and mounts. An exact match still takes the fast path, and two names that differ only in case throw as ambiguous. I haven't tried Demon's Souls itself, but/app0/packagecmdlineargs.txtagainstPackageCmdLineArgs.txtis the case it handles. Could the issue be closed, or is something still failing for you after pulling that?Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-08T16:41:54Z.
Thanks, that's the case. #1321 handles
/app0/packagecmdlineargs.txtagainstPackageCmdLineArgs.txtthe same way the fix proposed here did, so I'm closing this. I haven't booted Demon's Souls on a main that includes #1321 yet; I'll reopen if it doesn't get past the black screen.