mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
libsmbconf: let set_includes delete the includes paramter when given an empty list
instead of complaining Michael (This used to be commit 0dc1fd68598529891429fb29ab1f561fb434bf38)
This commit is contained in:
parent
9a3fe1943e
commit
1321dda51b
@ -984,8 +984,15 @@ static WERROR smbconf_reg_set_includes(struct smbconf_ctx *ctx,
|
||||
goto done;
|
||||
}
|
||||
|
||||
werr = smbconf_reg_set_multi_sz_value(key, INCLUDES_VALNAME,
|
||||
num_includes, includes);
|
||||
if (num_includes == 0) {
|
||||
if (!smbconf_value_exists(key, INCLUDES_VALNAME)) {
|
||||
goto done;
|
||||
}
|
||||
werr = reg_deletevalue(key, INCLUDES_VALNAME);
|
||||
} else {
|
||||
werr = smbconf_reg_set_multi_sz_value(key, INCLUDES_VALNAME,
|
||||
num_includes, includes);
|
||||
}
|
||||
|
||||
done:
|
||||
TALLOC_FREE(tmp_ctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user