refactor: create a variable for duplicate code

This commit is contained in:
oSumAtrIX 2022-07-19 00:50:26 +02:00
parent 9add2f9e82
commit 40c8500e38
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -75,11 +75,13 @@ class ZipFile(val file: File) {
filePointer.channel.write(it.toCDE())
}
val entriesCount = entries.size.toUShort()
val endRecord = ZipEndRecord(
0u,
0u,
entries.count().toUShort(),
entries.count().toUShort(),
entriesCount,
entriesCount,
filePointer.channel.position().toUInt() - CDEStart,
CDEStart,
""