aboutsummaryrefslogtreecommitdiff
path: root/src/Utilities/Path.kt
diff options
context:
space:
mode:
authorSergey Mashkov <sergey.mashkov@jetbrains.com>2015-08-07 12:32:17 +0300
committerSergey Mashkov <sergey.mashkov@jetbrains.com>2015-08-07 12:32:17 +0300
commitbdd02a3112397b711f16d411869c0c610899aebf (patch)
treea4c1c1fd3bfe0dcff94dc95e5f874d6afc2b7f1c /src/Utilities/Path.kt
parentd1ff5949b5807b57eab6010175b3c6f1e7c1945c (diff)
downloaddokka-bdd02a3112397b711f16d411869c0c610899aebf.tar.gz
dokka-bdd02a3112397b711f16d411869c0c610899aebf.tar.bz2
dokka-bdd02a3112397b711f16d411869c0c610899aebf.zip
~ Use new property access syntax
Diffstat (limited to 'src/Utilities/Path.kt')
-rw-r--r--src/Utilities/Path.kt5
1 files changed, 1 insertions, 4 deletions
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();