From bdd02a3112397b711f16d411869c0c610899aebf Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Fri, 7 Aug 2015 12:32:17 +0300 Subject: ~ Use new property access syntax --- src/Utilities/Path.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Utilities/Path.kt') diff --git a/src/Utilities/Path.kt b/src/Utilities/Path.kt index 24420ec7..fea22250 100644 --- a/src/Utilities/Path.kt +++ b/src/Utilities/Path.kt @@ -3,10 +3,7 @@ package org.jetbrains.dokka import java.io.* fun File.getRelativePath(name: File): File { - val parent = getParentFile() - - if (parent == null) - throw IOException("No common directory"); + val parent = parentFile ?: throw IOException("No common directory") val basePath = getCanonicalPath() + File.separator; val targetPath = name.getCanonicalPath(); -- cgit