mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
The 17.0.0 save indexing change that caused improperly wiped consoles to not boot
This commit is contained in:
parent
78e16d3d61
commit
e6d32b96d0
1 changed files with 1 additions and 16 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue