mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-10 16:01:50 -04:00
fix stream closing
This commit is contained in:
parent
4db357267e
commit
089734122a
@ -88,7 +88,7 @@ object InputStreamUtil {
|
|||||||
val stream = TarInputStream(this)
|
val stream = TarInputStream(this)
|
||||||
while (true) {
|
while (true) {
|
||||||
val entry = stream.nextEntry ?: break
|
val entry = stream.nextEntry ?: break
|
||||||
content[entry.name] = stream.readAll()
|
content[entry.name] = stream.readAll(false)
|
||||||
}
|
}
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
if (close) ignoreAll { close() }
|
if (close) ignoreAll { close() }
|
||||||
@ -100,7 +100,7 @@ object InputStreamUtil {
|
|||||||
val stream = ZipInputStream(this)
|
val stream = ZipInputStream(this)
|
||||||
while (true) {
|
while (true) {
|
||||||
val entry = stream.nextEntry ?: break
|
val entry = stream.nextEntry ?: break
|
||||||
content[entry.name] = stream.readAll()
|
content[entry.name] = stream.readAll(false)
|
||||||
}
|
}
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
if (close) ignoreAll { close() }
|
if (close) ignoreAll { close() }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user