From e5da546386053727136f562c09c2eb405773d6e2 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Tue, 10 Apr 2018 06:11:01 +0200 Subject: [PATCH] CommandLineOptions will now insert booleans into values with an value of "true" as well. --- .../de/fabianonline/telegram_backup/CommandLineOptions.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineOptions.kt b/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineOptions.kt index e9947a5..94f2412 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineOptions.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/CommandLineOptions.kt @@ -25,6 +25,7 @@ class CommandLineOptions(args: Array) { if (arg.startsWith("--")) { if (last_key!=null) { booleans.add(last_key!!) + values.put(last_key!!, "true") } last_key = arg.substring(2) } else { @@ -35,6 +36,9 @@ class CommandLineOptions(args: Array) { last_key = null } } - if (last_key!=null) booleans.add(last_key!!) + if (last_key!=null) { + booleans.add(last_key!!) + values.put(last_key!!, "true") + } } }