From a0e06449985c3aac21d20126a99f4ceab94015b0 Mon Sep 17 00:00:00 2001 From: enbandari <305779913@qq.com> Date: Sun, 16 Apr 2017 06:43:05 +0800 Subject: [PATCH] Use absoluteFile to avoid parentFile of defFile being null while the defFile is something like "-def interop.def". The parent of interop.def should be a existed dir. --- .../kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt index cdfca2c7cd5..2901aea4572 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt @@ -354,7 +354,7 @@ private fun processLib(konanHome: String, } } - val workDir = defFile?.parentFile ?: File(System.getProperty("java.io.tmpdir")) + val workDir = defFile?.absoluteFile?.parentFile ?: File(System.getProperty("java.io.tmpdir")) if (flavor == KotlinPlatform.JVM) {