Only throw an exception when no content was found for files that are actually in the title (and not a directory)

This commit is contained in:
Maschell 2019-04-18 23:27:39 +02:00
parent f8146ce56b
commit a9fc37244a

View File

@ -103,11 +103,13 @@ public final class FSTService {
if (contentsByIndex != null) {
Content content = contentsByIndex.get((int) contentIndex);
if (content == null) {
log.warning("Content for FST Entry not found");
throw new ParseException("Content for FST Entry not found", 0);
if (!entryParam.isDir() || entryParam.isNotInPackage()) {
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(content);
ContentFSTInfo contentFSTInfo = contentsFSTByIndex.get((int) contentIndex);
if (contentFSTInfo == null) {
log.warning("ContentFSTInfo for FST Entry not found");