From 06184da8d383a90c2a23459549b3e48dececfc8f Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 24 Apr 2019 13:26:25 +0200 Subject: [PATCH] Only throw an exception in the FSTService when a content for a given wasn't found if the Map is emtpy --- src/de/mas/wiiu/jnus/entities/fst/FSTService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/de/mas/wiiu/jnus/entities/fst/FSTService.java b/src/de/mas/wiiu/jnus/entities/fst/FSTService.java index 19449b8..8974df0 100644 --- a/src/de/mas/wiiu/jnus/entities/fst/FSTService.java +++ b/src/de/mas/wiiu/jnus/entities/fst/FSTService.java @@ -104,12 +104,12 @@ public final class FSTService { if (contentsByIndex != null) { Content content = contentsByIndex.get((int) contentIndex); if (content == null) { - if (!entryParam.isDir() || entryParam.isNotInPackage()) { - log.warning("Content for FST Entry not found"); + if ((!entryParam.isDir() || entryParam.isNotInPackage()) && !contentsByIndex.isEmpty()) { + // This is only a problem when the data is NOT on aWUDDataPartition (they have no content files) + log.warning("Content for FST Entry not found"); throw new ParseException("Content for FST Entry not found", 0); } } else { - // TODO: make content attribute in a fstentry optional entryParam.setContent(Optional.of(content)); ContentFSTInfo contentFSTInfo = contentsFSTByIndex.get((int) contentIndex); if (contentFSTInfo == null) {