snac2

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

commit a7bd9b63e4992018cade7c5c388bf30878389274
parent e362dfc3563c2564b550a3274f7bf5c7ad9e92f8
Author: default <nobody@localhost>
Date:   Thu, 11 Apr 2024 19:55:45 +0200

In object_unadmire(), don't call index_gc() if index_del() did nothing.

Diffstat:
Mdata.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/data.c b/data.c @@ -916,7 +916,9 @@ int object_unadmire(const char *id, const char *actor, int like) fn = xs_replace_i(fn, ".json", like ? "_l.idx" : "_a.idx"); status = index_del(fn, actor); - index_gc(fn); + + if (valid_status(status)) + index_gc(fn); srv_debug(0, xs_fmt("object_unadmire (%s) %s %s %d", like ? "Like" : "Announce", actor, fn, status));