[PR #506] [MERGED] Untranslocate app bundle path if needed on macOS. #1602

Closed
opened 2026-02-27 21:13:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/506
Author: @squidbus
Created: 8/21/2024
Status: Merged
Merged: 8/21/2024
Merged by: @georgemoralis

Base: mainHead: macos-translocation


📝 Commits (1)

  • 9275b09 Untranslocate app bundle path if needed on macOS.

📊 Changes

1 file changed (+40 additions, -10 deletions)

View changed files

📝 src/common/path_util.cpp (+40 -10)

📄 Description

macOS has a security feature where, if you download and extract an app in the downloads directory, it may be translocated to a temporary location when run. In order to properly find the user directory in this case, we need to un-translocate the bundle path using the Security framework. A similar workaround is used in other emulators such as PCSX2.

Fixes the cause of https://github.com/shadps4-emu/shadPS4/issues/494. I tested by downloading from GitHub Actions and running from the downloads folder; before it would crash, now it runs and uses the correct directory.


🔄 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/506 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 8/21/2024 **Status:** ✅ Merged **Merged:** 8/21/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `macos-translocation` --- ### 📝 Commits (1) - [`9275b09`](https://github.com/shadps4-emu/shadPS4/commit/9275b0966e65c707cfc522d74eb1e36abd6c9af3) Untranslocate app bundle path if needed on macOS. ### 📊 Changes **1 file changed** (+40 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/common/path_util.cpp` (+40 -10) </details> ### 📄 Description macOS has a security feature where, if you download and extract an app in the downloads directory, it may be translocated to a temporary location when run. In order to properly find the user directory in this case, we need to un-translocate the bundle path using the Security framework. A similar workaround is used in other emulators such as PCSX2. Fixes the cause of https://github.com/shadps4-emu/shadPS4/issues/494. I tested by downloading from GitHub Actions and running from the downloads folder; before it would crash, now it runs and uses the correct directory. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:13:15 +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#1602
No description provided.