mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-21 23:49:17 +01:00
Fix the getFSTEntriesByContentIndex function
This commit is contained in:
parent
010e349af9
commit
156fcd02df
@ -130,10 +130,12 @@ 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()) {
|
||||
return Stream.of(e);
|
||||
if (e.getContentIndex() == index) {
|
||||
return Stream.of(e);
|
||||
}
|
||||
return Stream.empty();
|
||||
}
|
||||
return getFSTEntriesByContentIndexAsStream(e, index);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user