[PR #3869] [MERGED] ENAMETOOLONG, posix_rename fix #3771

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3869
Author: @marecl
Created: 12/17/2025
Status: Merged
Merged: 12/19/2025
Merged by: @georgemoralis

Base: mainHead: main


📝 Commits (4)

📊 Changes

2 files changed (+79 additions, -36 deletions)

View changed files

📝 src/core/file_sys/fs.cpp (+3 -0)
📝 src/core/libraries/kernel/file_system.cpp (+76 -36)

📄 Description

ENAMETOOLONG if path has >255 characters
Corrected posix_rename behaviour:

  • handles errors only if dst exists (shouldn't error out if doesn't)
  • recursively removes "old name" (would otherwise fail if it's a not-empty dir)
  • actually creates target directory

[edit]
Previously: renaming dir would not create a new one nor remove the old one (no change in file structure), error when renaming dir to nonexistent target

Tested on linux so far, passes Therapist with flying colours


🔄 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/3869 **Author:** [@marecl](https://github.com/marecl) **Created:** 12/17/2025 **Status:** ✅ Merged **Merged:** 12/19/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`e4ecdcc`](https://github.com/shadps4-emu/shadPS4/commit/e4ecdcc11eb3225d027b0e20c7362909c3b0fbaf) ENAMETOOLONG on paths > 255 characters - [`bdd3007`](https://github.com/shadps4-emu/shadPS4/commit/bdd3007e4db5956d842fae366c0bc5a3ea249b79) Updated detection - [`e8c9ab8`](https://github.com/shadps4-emu/shadPS4/commit/e8c9ab8b7a2f7bc8ecd8d721cf15e0c2200d53c5) destubbed unlink() - [`b2cb412`](https://github.com/shadps4-emu/shadPS4/commit/b2cb4120948840e9b968e34d0bf29eba7c00b9fe) proper error returned ### 📊 Changes **2 files changed** (+79 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `src/core/file_sys/fs.cpp` (+3 -0) 📝 `src/core/libraries/kernel/file_system.cpp` (+76 -36) </details> ### 📄 Description ENAMETOOLONG if path has >255 characters Corrected posix_rename behaviour: * handles errors only if dst exists (shouldn't error out if doesn't) * recursively removes "old name" (would otherwise fail if it's a not-empty dir) * actually creates target directory [edit] Previously: renaming dir would not create a new one nor remove the old one (no change in file structure), error when renaming dir to nonexistent target Tested on linux so far, passes Therapist with flying colours --- <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:55 +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#3771
No description provided.