From 12f4123fb62b0a50497c6ba6a9fa194b903829f4 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 4 Mar 2016 23:19:51 +0400 Subject: [PATCH] Fix from files. --- .../src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt index 87ec9e80..13c0ebd3 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/JarUtils.kt @@ -39,8 +39,9 @@ public class JarUtils { foundFiles.forEach { foundFile -> // 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) - else File(directory, file.from(foundFile.path).path) + val fromFile = file.from(foundFile.path) + val localFile = if (fromFile.isAbsolute) fromFile + else File(directory, fromFile.path) if (!localFile.exists()) { throw AssertionError("File should exist: $localFile")