diff options
| author | 2022-11-24 09:06:41 +0100 | |
|---|---|---|
| committer | 2022-11-24 09:06:41 +0100 | |
| commit | 391fc5cd998eb75937de966154a71fdc7f20e843 (patch) | |
| tree | 8b36b6e3ee8230c344cfb1d28ecebb0f526a4c12 /data.c | |
| parent | Backport from xs. (diff) | |
| download | snac2-391fc5cd998eb75937de966154a71fdc7f20e843.tar.gz snac2-391fc5cd998eb75937de966154a71fdc7f20e843.tar.xz snac2-391fc5cd998eb75937de966154a71fdc7f20e843.zip | |
In object_add(), update the parent's children index even if the parent isn't here.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -409,10 +409,8 @@ int object_add(const char *id, d_char *obj) | |||
| 409 | /* update the children index of the parent */ | 409 | /* update the children index of the parent */ |
| 410 | xs *pfn = _object_fn(in_reply_to); | 410 | xs *pfn = _object_fn(in_reply_to); |
| 411 | 411 | ||
| 412 | if (mtime(pfn) > 0.0) { | 412 | pfn = xs_replace_i(pfn, ".json", "_c.idx"); |
| 413 | pfn = xs_replace_i(pfn, ".json", "_c.idx"); | 413 | index_add(pfn, id); |
| 414 | index_add(pfn, id); | ||
| 415 | } | ||
| 416 | } | 414 | } |
| 417 | } | 415 | } |
| 418 | else | 416 | else |