commit a7bd9b6

default  ·  2024-04-11 17:55:45 +0000 UTC
parent e362dfc
In object_unadmire(), don't call index_gc() if index_del() did nothing.
1 files changed,  +3, -1
M data.c
M data.c
+3, -1
 1@@ -916,7 +916,9 @@ int object_unadmire(const char *id, const char *actor, int like)
 2     fn = xs_replace_i(fn, ".json", like ? "_l.idx" : "_a.idx");
 3 
 4     status = index_del(fn, actor);
 5-    index_gc(fn);
 6+
 7+    if (valid_status(status))
 8+        index_gc(fn);
 9 
10     srv_debug(0,
11         xs_fmt("object_unadmire (%s) %s %s %d", like ? "Like" : "Announce", actor, fn, status));