Complete Kotlin port

This commit is contained in:
comp500
2019-12-21 02:04:10 +00:00
parent 9d3587c72e
commit a15489f5e4
9 changed files with 537 additions and 557 deletions

View File

@@ -74,10 +74,11 @@ class IndexFile {
}
// TODO: throw some kind of exception?
val name: String?
val name: String
get() {
if (metafile) {
return linkedFile?.name ?: linkedFile?.filename
return linkedFile?.name ?: linkedFile?.filename ?:
file?.run { Paths.get(path).fileName.toString() } ?: "Invalid file"
}
return file?.run { Paths.get(path).fileName.toString() } ?: "Invalid file"
}