1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-12-25 06:15:35 +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)
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