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

Fix copy().

Fixes https://github.com/cbeust/kobalt/issues/387
This commit is contained in:
Cedric Beust 2017-04-06 09:39:21 -07:00
parent 94400756ff
commit 38d2187eae
2 changed files with 11 additions and 8 deletions

View file

@ -21,9 +21,8 @@ open class IncludeFromTo {
@Directive
fun copy(from: From, to: To) {
with(File(from.path)) {
includedFiles.add(IncludedFile(from, to, listOf(IFileSpec.FileSpec(name))))
}
val dir = File(from.path).parentFile
includedFiles.add(IncludedFile(from(dir.absolutePath), to, listOf(IFileSpec.FileSpec(from.path))))
}
@Directive