fix stream closing

This commit is contained in:
Moritz Zwerger 2024-01-22 02:39:23 +01:00
parent 4db357267e
commit 089734122a
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -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() }