snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 2176a91c64fa8ad8a79c74bbd5a38f2934c49dbe
parent 4494fc3daf438733210ab3f20af5cd5492d60e2d
Author: default <nobody@localhost>
Date:   Thu, 24 Nov 2022 12:21:54 +0100

Fixed hide() to store the object id, not its md5.

Diffstat:
Mdata.c | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/data.c b/data.c @@ -1097,8 +1097,15 @@ void hide(snac *snac, const char *id) char *p, *v; p = chld; - while (xs_list_iter(&p, &v)) - hide(snac, v); + while (xs_list_iter(&p, &v)) { + xs *co = NULL; + + /* resolve to get the id */ + if (valid_status(object_get_by_md5(v, &co, NULL))) { + if ((v = xs_dict_get(co, "id")) != NULL) + hide(snac, v); + } + } } }