Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Adamczyk committed Dec 22, 2020
1 parent 14c86a1 commit aeb80e4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
6 changes: 0 additions & 6 deletions common/src/main/kotlin/flank.common/Archive.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ import org.rauschig.jarchivelib.ArchiveFormat
import org.rauschig.jarchivelib.ArchiverFactory
import org.rauschig.jarchivelib.CompressionType
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
import java.util.zip.ZipOutputStream


fun File.extract(
destination: File,
Expand Down
1 change: 0 additions & 1 deletion common/src/main/kotlin/flank.common/Strings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ fun String.normalizeLineEnding(): String {
return this.replace("\r\n", "\n")
}


fun String.trimStartLine(): String {
return this.split("\n").drop(1).joinToString("\n")
}
Expand Down
3 changes: 1 addition & 2 deletions common/src/main/kotlin/flank.common/Zip.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import java.util.zip.ZipEntry
import java.util.zip.ZipFile
import java.util.zip.ZipOutputStream


fun unzipFile(zipFileName: File, unzipPath: String): List<File> {
println("Unzipping: ${zipFileName.absolutePath} to $unzipPath")
return ZipFile(zipFileName).unzipTo(unzipPath)
Expand All @@ -23,7 +22,7 @@ private fun ZipFile.unzipTo(unzipPath: String) = use { zipFile ->

private fun ZipEntry.saveToFile(zipFile: ZipFile, unzipPath: String): File {
val outputFile = File(unzipPath, name)
if(isDirectory) {
if (isDirectory) {
outputFile.mkdirs()
} else {
zipFile.getInputStream(this).use { zipEntryInput -> zipEntryInput.toFile(outputFile) }
Expand Down

0 comments on commit aeb80e4

Please sign in to comment.