From 7ec3a38b8976a3ccaa032e41599da27432248a44 Mon Sep 17 00:00:00 2001 From: Stephen Miller <56742918+StevenMiller123@users.noreply.github.com> Date: Tue, 5 Aug 2025 03:52:53 -0500 Subject: [PATCH] libSceAppContent: Use last 16 characters of DLC folder to determine entitlement label (#3375) * Use last 16 characters of DLC folder name to determine entitlement label Code comments and commit name say it all. * Clang * Adjust comment ftpdump appends -ac at the end of the entitlement label, so my comment was partially incorrect. --- src/core/libraries/app_content/app_content.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/app_content/app_content.cpp b/src/core/libraries/app_content/app_content.cpp index 59497f847..1b2a9723e 100644 --- a/src/core/libraries/app_content/app_content.cpp +++ b/src/core/libraries/app_content/app_content.cpp @@ -260,7 +260,12 @@ int PS4_SYSV_ABI sceAppContentInitialize(const OrbisAppContentInitParam* initPar auto entitlement_label = entry.path().filename().string(); auto& info = addcont_info[addcont_count++]; info.status = OrbisAppContentAddcontDownloadStatus::Installed; - entitlement_label.copy(info.entitlement_label, sizeof(info.entitlement_label)); + + // Our recommended dumping method prepends the folder name with the game serial + // Since they end the folder name with the entitlement label, copy from the end instead. + entitlement_label.copy(info.entitlement_label, sizeof(info.entitlement_label), + entitlement_label.length() - + ORBIS_NP_UNIFIED_ENTITLEMENT_LABEL_SIZE + 1); } }