diff options
| author | 2024-04-11 19:55:45 +0200 | |
|---|---|---|
| committer | 2024-04-11 19:55:45 +0200 | |
| commit | a7bd9b63e4992018cade7c5c388bf30878389274 (patch) | |
| tree | f20659cd606de6ca51b7de5a36450e2727f68102 /data.c | |
| parent | Also purge like and announce index backups. (diff) | |
| download | snac2-a7bd9b63e4992018cade7c5c388bf30878389274.tar.gz snac2-a7bd9b63e4992018cade7c5c388bf30878389274.tar.xz snac2-a7bd9b63e4992018cade7c5c388bf30878389274.zip | |
In object_unadmire(), don't call index_gc() if index_del() did nothing.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -916,7 +916,9 @@ int object_unadmire(const char *id, const char *actor, int like) | |||
| 916 | fn = xs_replace_i(fn, ".json", like ? "_l.idx" : "_a.idx"); | 916 | fn = xs_replace_i(fn, ".json", like ? "_l.idx" : "_a.idx"); |
| 917 | 917 | ||
| 918 | status = index_del(fn, actor); | 918 | status = index_del(fn, actor); |
| 919 | index_gc(fn); | 919 | |
| 920 | if (valid_status(status)) | ||
| 921 | index_gc(fn); | ||
| 920 | 922 | ||
| 921 | srv_debug(0, | 923 | srv_debug(0, |
| 922 | xs_fmt("object_unadmire (%s) %s %s %d", like ? "Like" : "Announce", actor, fn, status)); | 924 | xs_fmt("object_unadmire (%s) %s %s %d", like ? "Like" : "Announce", actor, fn, status)); |