From 156fcd02df0361e5f8efeae1af869184ea8437a6 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 4 May 2019 11:11:04 +0200 Subject: [PATCH] Fix the getFSTEntriesByContentIndex function --- src/de/mas/wiiu/jnus/utils/FSTUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/de/mas/wiiu/jnus/utils/FSTUtils.java b/src/de/mas/wiiu/jnus/utils/FSTUtils.java index 9134203..cc4db68 100644 --- a/src/de/mas/wiiu/jnus/utils/FSTUtils.java +++ b/src/de/mas/wiiu/jnus/utils/FSTUtils.java @@ -130,10 +130,12 @@ public class FSTUtils { public static Stream getFSTEntriesByContentIndexAsStream(FSTEntry entry, short index) { return entry.getChildren().stream()// - .filter(e -> e.getContentIndex() == index) // .flatMap(e -> { if (!e.isDir()) { - return Stream.of(e); + if (e.getContentIndex() == index) { + return Stream.of(e); + } + return Stream.empty(); } return getFSTEntriesByContentIndexAsStream(e, index); });