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

Fix from files.

This commit is contained in:
Cedric Beust 2016-03-04 23:19:51 +04:00
parent 2b179abf49
commit 12f4123fb6

View file

@ -39,8 +39,9 @@ public class JarUtils {
foundFiles.forEach { foundFile -> foundFiles.forEach { foundFile ->
// Turn the found file into the local physical file that will be put in the jar file // Turn the found file into the local physical file that will be put in the jar file
val localFile = if (File(foundFile.path).isAbsolute) File(foundFile.path) val fromFile = file.from(foundFile.path)
else File(directory, file.from(foundFile.path).path) val localFile = if (fromFile.isAbsolute) fromFile
else File(directory, fromFile.path)
if (!localFile.exists()) { if (!localFile.exists()) {
throw AssertionError("File should exist: $localFile") throw AssertionError("File should exist: $localFile")