diff --git a/webp-imageio/src/main/kotlin/com/luciad/imageio/webp/internal/NativeLoader.kt b/webp-imageio/src/main/kotlin/com/luciad/imageio/webp/internal/NativeLoader.kt index 1966b44..319de7c 100644 --- a/webp-imageio/src/main/kotlin/com/luciad/imageio/webp/internal/NativeLoader.kt +++ b/webp-imageio/src/main/kotlin/com/luciad/imageio/webp/internal/NativeLoader.kt @@ -79,9 +79,8 @@ internal object NativeLoader { val tempFolder = tempDir.absolutePath val dir = File(tempFolder) - dir.walkBottomUp() - .filter { it.name.startsWith("webp-imageio-$version") && !it.name.endsWith(".lck") } - .forEach { nativeLibFile -> + dir.listFiles { _, name -> name.startsWith("webp-imageio-$version") && !name.endsWith(".lck") } + ?.forEach { nativeLibFile -> val lckFile = File(nativeLibFile.absolutePath + ".lck") if (!lckFile.exists()) { try {