From ff9163c1bb79fce3c1fe9eb53c17b6fb2d6c7de9 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Wed, 11 Apr 2018 05:51:00 +0200 Subject: [PATCH] Settings: Is CLI is set, use it instead of INI. --- .../kotlin/de/fabianonline/telegram_backup/Settings.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/Settings.kt b/src/main/kotlin/de/fabianonline/telegram_backup/Settings.kt index c479e21..74982ab 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/Settings.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/Settings.kt @@ -92,12 +92,12 @@ class Setting(val ini: Map>, val cli: CommandLineOptions, v val logger = LoggerFactory.getLogger(Setting::class.java) init { - if (getIni(name) != null) { - values = getIni(name)!! - source = SettingSource.INI - } else if (getCli(name) != null) { + if (getCli(name) != null) { values = listOf(getCli(name)!!) source = SettingSource.CLI + } else if (getIni(name) != null) { + values = getIni(name)!! + source = SettingSource.INI } else { values = default source = SettingSource.DEFAULT