mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #3099] [MERGED] Filesystem: Fixes for posix_rename and write #3223
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#3223
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/3099
Author: @StevenMiller123
Created: 6/15/2025
Status: ✅ Merged
Merged: 6/15/2025
Merged by: @georgemoralis
Base:
main← Head:not-so-save-fixes📝 Commits (7)
ae638c0Fix renameea92214sceKernelWrite hack77c11dahack fixbfbe1d4Improved "hack"4c881f6Fix rename for Windows usersdb19ea1A real fix for the sceKernelWrite issueec70160Move fflush call to WriteRaw📊 Changes
2 files changed (+21 additions, -1 deletions)
View changed files
📝
src/common/io_file.h(+3 -1)📝
src/core/libraries/kernel/file_system.cpp(+18 -0)📄 Description
On some platforms,
WriteRawdoesn't write all the data to the file immediately, resulting inwritereturning more bytes than what we actually wrote to the file stream. To fix this, I've added anstd::fflushcall toWriteRaw, which ensures all buffered data is written before the function call returns.Additionally, our
posix_renamefunction was only copying files, instead of renaming this. On closer inspection, it seems like this was done to prevent "shared access" errors on Windows devices, which could occur if the file to rename was already open. To work around this, I've added code to close the source file, delete it, then open the "renamed" copy.These two fixes solve the savedata errors in DRAGON BALL XENOVERSE (CUSA01341) and DRAGON BALL XENOVERSE 2 (CUSA05350).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.