In object_add(), update the parent's children index even if the parent isn't here.

This commit is contained in:
default 2022-11-24 09:06:41 +01:00
parent f2528c6c52
commit 391fc5cd99

2
data.c
View file

@ -409,12 +409,10 @@ int object_add(const char *id, d_char *obj)
/* update the children index of the parent */ /* update the children index of the parent */
xs *pfn = _object_fn(in_reply_to); xs *pfn = _object_fn(in_reply_to);
if (mtime(pfn) > 0.0) {
pfn = xs_replace_i(pfn, ".json", "_c.idx"); pfn = xs_replace_i(pfn, ".json", "_c.idx");
index_add(pfn, id); index_add(pfn, id);
} }
} }
}
else else
status = 500; status = 500;