[PR #3414] [MERGED] Core: Add entries for . and .. in MntPoints::IterateDirectory #3449

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3414
Author: @StevenMiller123
Created: 8/12/2025
Status: Merged
Merged: 8/13/2025
Merged by: @georgemoralis

Base: mainHead: dirent-fix


📝 Commits (1)

  • 56ca567 Add entries for . and .. in MntPoints::IterateDirectory

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 src/core/file_sys/fs.cpp (+4 -0)

📄 Description

On a real PS4, all directories will start with an directory entry for "." and "..". Emulating this behavior is necessary for some games, since devs can safely assume there will always be at least one entry in a given directory, and try to read said entry regardless of what we return.

Emulating these two entries fixes an exception in Grand Theft Auto V (CUSA00419) that occurs if the game's /download0 mount is empty.

For context, here's the output on real hardware, from a homebrew I wrote for testing this:
image

Here's what the current shadPS4 main build shows:
image

And here's what my PR shows:
image


🔄 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/3414 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 8/12/2025 **Status:** ✅ Merged **Merged:** 8/13/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `dirent-fix` --- ### 📝 Commits (1) - [`56ca567`](https://github.com/shadps4-emu/shadPS4/commit/56ca5676984b9d7d9ccb972f9a476575fba1fb73) Add entries for . and .. in MntPoints::IterateDirectory ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/core/file_sys/fs.cpp` (+4 -0) </details> ### 📄 Description On a real PS4, all directories will start with an directory entry for "." and "..". Emulating this behavior is necessary for some games, since devs can safely assume there will always be at least one entry in a given directory, and try to read said entry regardless of what we return. Emulating these two entries fixes an exception in Grand Theft Auto V (CUSA00419) that occurs if the game's /download0 mount is empty. For context, here's the output on real hardware, from a homebrew I wrote for testing this: <img width="452" height="266" alt="image" src="https://github.com/user-attachments/assets/f3780b43-89a3-4259-bf96-c0ea78440e1c" /> Here's what the current shadPS4 main build shows: <img width="637" height="34" alt="image" src="https://github.com/user-attachments/assets/ed4b6511-b6d4-43f8-a6a3-3e1511845c18" /> And here's what my PR shows: <img width="618" height="240" alt="image" src="https://github.com/user-attachments/assets/e24f39c7-feef-4fa1-a7f3-400720e0ef7e" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:44 +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#3449
No description provided.