diff --git a/cache/src/main/kotlin/org/openrs2/cache/FlatFileStore.kt b/cache/src/main/kotlin/org/openrs2/cache/FlatFileStore.kt index 072eb906..fd184b46 100644 --- a/cache/src/main/kotlin/org/openrs2/cache/FlatFileStore.kt +++ b/cache/src/main/kotlin/org/openrs2/cache/FlatFileStore.kt @@ -47,7 +47,6 @@ public class FlatFileStore private constructor( return stream.filter { Files.isDirectory(it) && ARCHIVE_NAME.matches(it.fileName.toString()) } .map { Integer.parseInt(it.fileName.toString()) } .sorted() - .toList() } } @@ -61,7 +60,6 @@ public class FlatFileStore private constructor( return stream.filter { Files.isRegularFile(it) && GROUP_NAME.matches(it.fileName.toString()) } .map { Integer.parseInt(it.fileName.toString().removeSuffix(GROUP_EXTENSION)) } .sorted() - .toList() } } diff --git a/util/src/main/kotlin/org/openrs2/util/io/PathExtensions.kt b/util/src/main/kotlin/org/openrs2/util/io/PathExtensions.kt index 26d77d11..7036808b 100644 --- a/util/src/main/kotlin/org/openrs2/util/io/PathExtensions.kt +++ b/util/src/main/kotlin/org/openrs2/util/io/PathExtensions.kt @@ -45,11 +45,11 @@ public fun Path.recursiveEquals( filter: (Path) -> Boolean = { true } ): Boolean { val list1 = Files.newDirectoryStream(this).use { stream -> - stream.filter(filter).map { this.relativize(it).toString() }.sorted().toList() + stream.filter(filter).map { this.relativize(it).toString() }.sorted() } val list2 = Files.newDirectoryStream(other).use { stream -> - stream.filter(filter).map { other.relativize(it).toString() }.sorted().toList() + stream.filter(filter).map { other.relativize(it).toString() }.sorted() } if (list1 != list2) {