Fixed arguments checks.
This commit is contained in:
parent
aa3fa295d9
commit
f1d0dcb03b
2 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import net.thauvin.erik.readingtime.ReadingTime.Companion.imgCount
|
|||
import net.thauvin.erik.readingtime.ReadingTime.Companion.wordCount
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
if (args.size == 1) {
|
||||
if (args.isNotEmpty()) {
|
||||
val text = File(args[0])
|
||||
if (text.exists() && text.canRead()) {
|
||||
val rt = ReadingTime(text.readText())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue