fix: custom client, options, option2bool() (#8302)

* fix: custom client, options, option2bool()

Signed-off-by: fufesou <linlong1266@gmail.com>

* format

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-06-10 00:11:59 +08:00 committed by GitHub
parent 78d7bfac01
commit 32ab56f864
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 45 additions and 7 deletions

View file

@ -1422,6 +1422,9 @@ String translate(String name) {
return platformFFI.translate(name, localeName);
}
// This function must be kept the same as the one in rust and sciter code.
// rust: libs/hbb_common/src/config.rs -> option2bool()
// sciter: Does not have the function, but it should be kept the same.
bool option2bool(String option, String value) {
bool res;
if (option.startsWith("enable-")) {