From e6d32b96d0671b7f4b0d10e94eabfb238dc475a0 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Tue, 30 Jan 2024 22:24:51 -0700 Subject: [PATCH] The 17.0.0 save indexing change that caused improperly wiped consoles to not boot --- src/LibHac/FsSrv/SaveDataFileSystemService.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/LibHac/FsSrv/SaveDataFileSystemService.cs b/src/LibHac/FsSrv/SaveDataFileSystemService.cs index 3e1cb5bd..23dffb7b 100644 --- a/src/LibHac/FsSrv/SaveDataFileSystemService.cs +++ b/src/LibHac/FsSrv/SaveDataFileSystemService.cs @@ -1642,10 +1642,9 @@ internal class SaveDataFileSystemService : ISaveDataTransferCoreInterface, ISave ulong saveDataId; SaveDataAttribute key = attribute; - bool isStaticSaveDataId = attribute.StaticSaveDataId != InvalidSystemSaveDataId && attribute.UserId == InvalidUserId; // Get the ID of the save data - if (isStaticSaveDataId) + if (attribute.StaticSaveDataId == SaveIndexerId) { saveDataId = attribute.StaticSaveDataId; } @@ -1700,20 +1699,6 @@ internal class SaveDataFileSystemService : ISaveDataTransferCoreInterface, ISave { if (saveDataId != SaveIndexerId) { - if (isStaticSaveDataId) - { - // The accessor won't be open yet if the save has a static ID - Result res = OpenSaveDataIndexerAccessor(ref accessor.Ref, spaceId); - if (res.IsFailure()) return res.Miss(); - - // Check the space ID of the save data - res = accessor.Get.GetInterface().Get(out SaveDataIndexerValue value, in key); - if (res.IsFailure()) return res.Miss(); - - if (value.SpaceId != ConvertToRealSpaceId(spaceId)) - return ResultFs.TargetNotFound.Log(); - } - // Remove the indexer entry. Nintendo ignores these results accessor.Get.GetInterface().Delete(saveDataId).IgnoreResult(); accessor.Get.GetInterface().Commit().IgnoreResult();