1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Fix slashes in the zip file.

This commit is contained in:
Cedric Beust 2017-04-22 13:23:11 -07:00
parent 49e69d0964
commit 6a08d3caa8
2 changed files with 3 additions and 1 deletions

View file

@ -25,7 +25,7 @@ class MetaArchive(outputFile: File, val manifest: Manifest?) : Closeable {
fun addFile(f: File, entryFile: File, path: String?) {
val file = f.normalize()
FileInputStream(file).use { inputStream ->
val actualPath = if (path != null) path + entryFile.path else entryFile.path
val actualPath = KFiles.fixSlashes(if (path != null) path + entryFile.path else entryFile.path)
ZipArchiveEntry(actualPath).let { entry ->
maybeAddEntry(entry) {
addEntry(entry, inputStream)