From 089734122aec2bf0a7c0efd6b8c34b22918ef2c3 Mon Sep 17 00:00:00 2001 From: Moritz Zwerger Date: Mon, 22 Jan 2024 02:39:23 +0100 Subject: [PATCH] fix stream closing --- .../java/de/bixilon/minosoft/assets/util/InputStreamUtil.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/assets/util/InputStreamUtil.kt b/src/main/java/de/bixilon/minosoft/assets/util/InputStreamUtil.kt index e00b5d48a..4dfcf7ffa 100644 --- a/src/main/java/de/bixilon/minosoft/assets/util/InputStreamUtil.kt +++ b/src/main/java/de/bixilon/minosoft/assets/util/InputStreamUtil.kt @@ -88,7 +88,7 @@ object InputStreamUtil { val stream = TarInputStream(this) while (true) { val entry = stream.nextEntry ?: break - content[entry.name] = stream.readAll() + content[entry.name] = stream.readAll(false) } // TODO: handle exception if (close) ignoreAll { close() } @@ -100,7 +100,7 @@ object InputStreamUtil { val stream = ZipInputStream(this) while (true) { val entry = stream.nextEntry ?: break - content[entry.name] = stream.readAll() + content[entry.name] = stream.readAll(false) } // TODO: handle exception if (close) ignoreAll { close() }