Fix search for the title key

This commit is contained in:
Maschell 2019-04-12 20:04:40 +02:00
parent 0af70ed3a4
commit 606d4485c8

View File

@ -13,14 +13,14 @@ public class TicketUtils {
File ticketFile = FileUtils.getFileIgnoringFilenameCases(folder.getAbsolutePath(), "title.tik"); File ticketFile = FileUtils.getFileIgnoringFilenameCases(folder.getAbsolutePath(), "title.tik");
Ticket ticket = null; Ticket ticket = null;
if (ticketFile.exists()) { if (ticketFile != null && ticketFile.exists()) {
try { try {
ticket = Ticket.parseTicket(ticketFile, commonKey); ticket = Ticket.parseTicket(ticketFile, commonKey);
} catch (IOException e) { } catch (IOException e) {
} }
} }
if (ticket == null && keyFolder != null) { if (ticket == null && keyFolder != null) {
File keyFile = FileUtils.getFileIgnoringFilenameCases(folder.getAbsolutePath(), String.format("%016X", titleID) + ".key"); File keyFile = FileUtils.getFileIgnoringFilenameCases(keyFolder.getAbsolutePath(), String.format("%016X", titleID) + ".key");
if (keyFile.exists()) { if (keyFile.exists()) {
byte[] key; byte[] key;
try { try {