Fix the issue of being unable to read legacy scanner configurations

This commit is contained in:
qun.huang 2024-11-14 09:34:41 +08:00
parent 0e9854372e
commit f0482fbe7f

View File

@ -149,7 +149,7 @@ func LookupConfig(kvs config.KVS) (cfg Config, err error) {
// has not been changed from its "default" value, if it has been changed honor new settings. // has not been changed from its "default" value, if it has been changed honor new settings.
if kvs.GetWithDefault(Speed, DefaultKVS) == "default" { if kvs.GetWithDefault(Speed, DefaultKVS) == "default" {
if kvs.Get(Delay) != "" && kvs.Get(MaxWait) != "" { if kvs.Get(Delay) != "" && kvs.Get(MaxWait) != "" {
if err = lookupDeprecatedScannerConfig(kvs, &cfg); err != nil { if err = lookupDeprecatedScannerConfig(kvs, &cfg); err == nil {
return cfg, err return cfg, err
} }
} }