diff options
Diffstat (limited to 'src/Utilities/Path.kt')
-rw-r--r-- | src/Utilities/Path.kt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Utilities/Path.kt b/src/Utilities/Path.kt index 292b0eed..36277d9f 100644 --- a/src/Utilities/Path.kt +++ b/src/Utilities/Path.kt @@ -4,10 +4,7 @@ import java.io.File import java.io.IOException fun File.getRelativePath(name: File): File { - val parent = parentFile - - if (parent == null) - throw IOException("No common directory"); + val parent = parentFile ?: throw IOException("No common directory") val basePath = canonicalPath + File.separator; val targetPath = name.canonicalPath; |