mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 09:13:38 +00:00
In object_add(), update the parent's children index even if the parent isn't here.
This commit is contained in:
parent
f2528c6c52
commit
391fc5cd99
1 changed files with 2 additions and 4 deletions
2
data.c
2
data.c
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue