mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-25 09:26:55 +01:00
Fix the getFSTEntriesByContentIndex function
This commit is contained in:
parent
010e349af9
commit
156fcd02df
@ -130,11 +130,13 @@ public class FSTUtils {
|
||||
|
||||
public static Stream<FSTEntry> getFSTEntriesByContentIndexAsStream(FSTEntry entry, short index) {
|
||||
return entry.getChildren().stream()//
|
||||
.filter(e -> e.getContentIndex() == index) //
|
||||
.flatMap(e -> {
|
||||
if (!e.isDir()) {
|
||||
if (e.getContentIndex() == index) {
|
||||
return Stream.of(e);
|
||||
}
|
||||
return Stream.empty();
|
||||
}
|
||||
return getFSTEntriesByContentIndexAsStream(e, index);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user