aboutsummaryrefslogtreecommitdiff
path: root/src/Utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utilities')
-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();