mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-25 17:36:55 +01:00
Make SI partitions optional for Wii U discs
This commit is contained in:
parent
6e9b8df971
commit
7d8bb58cc4
@ -108,7 +108,10 @@ public final class WUDInfoParser {
|
||||
internalPartitions.put(partitionName, partitionOffset);
|
||||
}
|
||||
|
||||
Map<String, WUDPartition> partitionsResult = new HashMap<>();
|
||||
|
||||
val siPartitionOpt = internalPartitions.entrySet().stream().filter(e -> e.getKey().startsWith("SI")).findFirst();
|
||||
if (siPartitionOpt.isPresent()) {
|
||||
val siPartitionPair = siPartitionOpt.orElseThrow(() -> new ParseException("SI partition not found.", 0));
|
||||
|
||||
// siPartition
|
||||
@ -130,8 +133,6 @@ public final class WUDInfoParser {
|
||||
|
||||
FST siFST = FST.parseFST(fileTableBlock, null);
|
||||
|
||||
Map<String, WUDPartition> partitionsResult = new HashMap<>();
|
||||
|
||||
for (val dirChilden : siFST.getRoot().getDirChildren()) {
|
||||
// The SI partition contains the tmd, cert and tik for every GM partition.
|
||||
byte[] rawTIK = getFSTEntryAsByte(dirChilden.getFullPath() + File.separator + WUD_TICKET_FILENAME, siPartitionOffset, siFST,
|
||||
@ -153,6 +154,7 @@ public final class WUDInfoParser {
|
||||
curPartition.setPartitionHeader(partitionHeader);
|
||||
partitionsResult.put(curPartitionPair.getKey(), curPartition);
|
||||
}
|
||||
}
|
||||
|
||||
val dataPartitions = internalPartitions.entrySet().stream().filter(e -> !e.getKey().startsWith("GM")).collect(Collectors.toList());
|
||||
for (val dataPartition : dataPartitions) {
|
||||
|
Loading…
Reference in New Issue
Block a user