diff options
| author | 2022-11-24 12:21:54 +0100 | |
|---|---|---|
| committer | 2022-11-24 12:21:54 +0100 | |
| commit | 2176a91c64fa8ad8a79c74bbd5a38f2934c49dbe (patch) | |
| tree | fad37a1f1f95ca5b153f411ef7adf2fd7f7c1df1 | |
| parent | Fixed muted filenames. (diff) | |
| download | snac2-2176a91c64fa8ad8a79c74bbd5a38f2934c49dbe.tar.gz snac2-2176a91c64fa8ad8a79c74bbd5a38f2934c49dbe.tar.xz snac2-2176a91c64fa8ad8a79c74bbd5a38f2934c49dbe.zip | |
Fixed hide() to store the object id, not its md5.
| -rw-r--r-- | data.c | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -1097,8 +1097,15 @@ void hide(snac *snac, const char *id) | |||
| 1097 | char *p, *v; | 1097 | char *p, *v; |
| 1098 | 1098 | ||
| 1099 | p = chld; | 1099 | p = chld; |
| 1100 | while (xs_list_iter(&p, &v)) | 1100 | while (xs_list_iter(&p, &v)) { |
| 1101 | hide(snac, v); | 1101 | xs *co = NULL; |
| 1102 | |||
| 1103 | /* resolve to get the id */ | ||
| 1104 | if (valid_status(object_get_by_md5(v, &co, NULL))) { | ||
| 1105 | if ((v = xs_dict_get(co, "id")) != NULL) | ||
| 1106 | hide(snac, v); | ||
| 1107 | } | ||
| 1108 | } | ||
| 1102 | } | 1109 | } |
| 1103 | } | 1110 | } |
| 1104 | 1111 | ||