[PR #3876] [MERGED] Dirents backport #3775

Closed
opened 2026-02-27 22:04:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3876
Author: @marecl
Created: 12/24/2025
Status: Merged
Merged: 1/9/2026
Merged by: @georgemoralis

Base: mainHead: main


📝 Commits (7)

📊 Changes

6 files changed (+264 additions, -291 deletions)

View changed files

📝 src/core/file_sys/directories/base_directory.cpp (+32 -0)
📝 src/core/file_sys/directories/base_directory.h (+14 -10)
📝 src/core/file_sys/directories/normal_directory.cpp (+120 -101)
📝 src/core/file_sys/directories/normal_directory.h (+7 -11)
📝 src/core/file_sys/directories/pfs_directory.cpp (+85 -159)
📝 src/core/file_sys/directories/pfs_directory.h (+6 -10)

📄 Description

Backported dirents from QFS PR:

  • Fileno tracking (dynamically assigned, unique)
  • Simpler creation
  • Small doc inside
  • Pretty accurate replication
  • Normal dirent updates contents dynamically (PFS doesn't since it's RO)

Corrected LSeek behaviour on negative OOB offset (EINVAL)

Tested with Enderman and Therapist from integration tests:

Enderman_01.00__0.13.0.log
Enderman_01.00__backport.log
Enderman_01.00__OFW11.52.log

Therapist_01.30__0.13.0.log
Therapist_01.30_backport.log
Therapist_01.30__OFW11.52.log


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3876 **Author:** [@marecl](https://github.com/marecl) **Created:** 12/24/2025 **Status:** ✅ Merged **Merged:** 1/9/2026 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (7) - [`3dcb305`](https://github.com/shadps4-emu/shadPS4/commit/3dcb305bf902e6735b1ef275843bd7247499575d) lseek for directories behaves correctly when final index is smaller than 0 (EINVAL) - [`963e723`](https://github.com/shadps4-emu/shadPS4/commit/963e723784074267f04943ee0a6eabb5f4efde2d) Merge branch 'main' into main - [`ce74cb3`](https://github.com/shadps4-emu/shadPS4/commit/ce74cb32b257875918c77126dab826a0a2b5d283) PFS moves pointer to end when last dirent is returned - [`ef92042`](https://github.com/shadps4-emu/shadPS4/commit/ef92042fb4e58d1b81e618c252f87b9aa9172999) Merge branch 'main' of https://github.com/marecl/shadPS4 - [`ee84d83`](https://github.com/shadps4-emu/shadPS4/commit/ee84d83e1679797e78dedc2c17b0e084a2e35d79) Correct entry type in PFS directory - [`13cf199`](https://github.com/shadps4-emu/shadPS4/commit/13cf19944ab5407c5429f1f319549276dce5c7ce) Merge remote-tracking branch 'upstream/main' - [`6c13e5d`](https://github.com/shadps4-emu/shadPS4/commit/6c13e5d6e047f7d409c152a42d4dd173b7482bf6) Merge branch 'main' into main ### 📊 Changes **6 files changed** (+264 additions, -291 deletions) <details> <summary>View changed files</summary> 📝 `src/core/file_sys/directories/base_directory.cpp` (+32 -0) 📝 `src/core/file_sys/directories/base_directory.h` (+14 -10) 📝 `src/core/file_sys/directories/normal_directory.cpp` (+120 -101) 📝 `src/core/file_sys/directories/normal_directory.h` (+7 -11) 📝 `src/core/file_sys/directories/pfs_directory.cpp` (+85 -159) 📝 `src/core/file_sys/directories/pfs_directory.h` (+6 -10) </details> ### 📄 Description Backported dirents from QFS PR: * Fileno tracking (dynamically assigned, unique) * Simpler creation * Small doc inside * Pretty accurate replication * Normal dirent updates contents dynamically (PFS doesn't since it's RO) Corrected LSeek behaviour on negative OOB offset (EINVAL) Tested with Enderman and Therapist from integration tests: [Enderman_01.00__0.13.0.log](https://github.com/user-attachments/files/24341028/Enderman_01.00__0.13.0.log) [Enderman_01.00__backport.log](https://github.com/user-attachments/files/24347816/Enderman_01.00__backport.log) [Enderman_01.00__OFW11.52.log](https://github.com/user-attachments/files/24341030/Enderman_01.00__OFW11.52.log) [Therapist_01.30__0.13.0.log](https://github.com/user-attachments/files/24341031/Therapist_01.30__0.13.0.log) [Therapist_01.30_backport.log](https://github.com/user-attachments/files/24341032/Therapist_01.30_backport.log) [Therapist_01.30__OFW11.52.log](https://github.com/user-attachments/files/24341033/Therapist_01.30__OFW11.52.log) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3775
No description provided.