From 6a46563a9357c3024dc59b79612db6692112e032 Mon Sep 17 00:00:00 2001 From: Yunus Shaikh <75296019+EagleBearerYS@users.noreply.github.com> Date: Tue, 13 Oct 2026 07:09:13 -0700 Subject: [PATCH] refactor(savedata): clear the mount result once the mount point is made #5173 changes the create condition right after the last error check, and #3950 removes the comment after the create block, so clearing the result in either place made the pull requests conflict. The result is still cleared only after every error return and before anything is written to it. --- core/libs/prx/libSceSaveData.native/Export.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/libs/prx/libSceSaveData.native/Export.cpp b/core/libs/prx/libSceSaveData.native/Export.cpp index 719a79dbf..8c455e7cb 100644 --- a/core/libs/prx/libSceSaveData.native/Export.cpp +++ b/core/libs/prx/libSceSaveData.native/Export.cpp @@ -497,7 +497,6 @@ static int mount3(const SaveDataMount3* mount, SaveDataMountResult* mount_result if (slot == -1) { return SAVE_DATA_ERROR_MOUNT_FULL; } - std::memset(mount_result, 0, sizeof(*mount_result)); if (create || create2) { std::filesystem::create_directories(real_path); } @@ -505,6 +504,7 @@ static int mount3(const SaveDataMount3* mount, SaveDataMountResult* mount_result // path resolver maps it to the save directory, whose name may be far longer. const std::string mountPoint = "/savedata" + std::to_string(slot); AddPathAlias_nid_no_patch(mountPoint.c_str(), std::filesystem::absolute(real_path).string().c_str()); + std::memset(mount_result, 0, sizeof(*mount_result)); g_slots[slot].used = true; g_slots[slot].mount_point = mountPoint; g_slots[slot].real_path = real_path;