1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-11-22 08:46:15 +00:00

Settings: Is CLI is set, use it instead of INI.

This commit is contained in:
Fabian Schlenz 2018-04-11 05:51:00 +02:00
parent 38fce0ee5c
commit ff9163c1bb

View File

@ -92,12 +92,12 @@ class Setting(val ini: Map<String, List<String>>, val cli: CommandLineOptions, v
val logger = LoggerFactory.getLogger(Setting::class.java) val logger = LoggerFactory.getLogger(Setting::class.java)
init { init {
if (getIni(name) != null) { if (getCli(name) != null) {
values = getIni(name)!!
source = SettingSource.INI
} else if (getCli(name) != null) {
values = listOf(getCli(name)!!) values = listOf(getCli(name)!!)
source = SettingSource.CLI source = SettingSource.CLI
} else if (getIni(name) != null) {
values = getIni(name)!!
source = SettingSource.INI
} else { } else {
values = default values = default
source = SettingSource.DEFAULT source = SettingSource.DEFAULT