mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 00:05:58 +03:00
[PR #2868] [MERGED] libkernel: Various filesystem fixes #3041
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3041
Loading…
Add table
Add a link
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?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/2868
Author: @StevenMiller123
Created: 5/1/2025
Status: ✅ Merged
Merged: 5/1/2025
Merged by: @georgemoralis
Base:
main← Head:fs-fixes📝 Commits (10+)
83926f9Proper handling of whence 3 & 44118b5fAccurate directory handling in open9081778Mount /app0 as read only7ab496bProper directory flag handling.5f3da89Check for read only directories384e036Earlier ro check in posix_rmdirad089f0Clear temp folder on bootd17297cMerge branch 'shadps4-emu:main' into fs-fixes5a5a42cClang32b34f9Add missing DeleteHandle calls📊 Changes
4 files changed (+131 additions, -83 deletions)
View changed files
📝
src/common/io_file.cpp(+1 -3)📝
src/common/io_file.h(+0 -2)📝
src/core/libraries/kernel/file_system.cpp(+121 -73)📝
src/emulator.cpp(+9 -5)📄 Description
This PR makes some filesystem changes to improve shadPS4's accuracy when compared against a PS4.
openflag handling. There were many inaccuracies visible in my tests, which either led to files opening that shouldn't open, or throwing errors when a file would open successfully on real hardware./app0and/hostappas read-only. Some games, particularly Unity games, will make modifications to their own game files if you don't handle this properly./tempand/temp0on boot. On real hardware, the console will freshly format a partition to mount to these paths. While emulating it that closely is unfeasible, clearing the temp directory will lead to a similar effect in practice.lseek. It appears that Sony disabled these extensions on PS4s, and trying to use them throws a unique error code.posix_stat. The reduced permissions this reported before caused Bloodborne to disable audio entirely when/app0is mounted as read only.Below are the results of my hardware tests, which all of the

openchanges were based on.Hardware tests:
This PR:

Main:

So far, these fixes appear to progress KINGDOM HEARTS Melody of Memory (CUSA18900) further in loading, though the game still loops the same loading screen endlessly. Beyond this, I've seen no regressions in my testing.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.