mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 16:48:12 -07:00
Fix empty new line in manifest.
This commit is contained in:
parent
d7a95d0c0c
commit
4281a1cad8
1 changed files with 4 additions and 5 deletions
|
@ -9,7 +9,6 @@ import java.io.Closeable
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
import java.io.FileOutputStream
|
import java.io.FileOutputStream
|
||||||
import java.nio.file.Files
|
|
||||||
import java.util.jar.Manifest
|
import java.util.jar.Manifest
|
||||||
import org.apache.commons.compress.archivers.zip.ZipFile as ApacheZipFile
|
import org.apache.commons.compress.archivers.zip.ZipFile as ApacheZipFile
|
||||||
|
|
||||||
|
@ -29,14 +28,14 @@ class MetaArchive(outputFile: File, val manifest: Manifest?) : Closeable {
|
||||||
init {
|
init {
|
||||||
// If no manifest was passed, create an empty one so it's the first one in the archive
|
// If no manifest was passed, create an empty one so it's the first one in the archive
|
||||||
val m = manifest ?: Manifest()
|
val m = manifest ?: Manifest()
|
||||||
Files.createTempFile("kobalt", "tmpManifest").toFile().let { manifestFile ->
|
val manifestFile = File.createTempFile("kobalt", "tmpManifest")
|
||||||
|
if (manifest != null) {
|
||||||
FileOutputStream(manifestFile).use { fos ->
|
FileOutputStream(manifestFile).use { fos ->
|
||||||
m.write(fos)
|
m.write(fos)
|
||||||
}
|
}
|
||||||
|
|
||||||
val entry = zos.createArchiveEntry(manifestFile, MetaArchive.MANIFEST_MF)
|
|
||||||
addEntry(entry, FileInputStream(manifestFile))
|
|
||||||
}
|
}
|
||||||
|
val entry = zos.createArchiveEntry(manifestFile, MetaArchive.MANIFEST_MF)
|
||||||
|
addEntry(entry, FileInputStream(manifestFile))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue