summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-02-22 18:15:48 +0100
committerdefault <nobody@localhost>2023-02-22 18:15:48 +0100
commit23c433ee0257baf704eb4ff4b7f7a77d549f088c (patch)
tree35a14f94594ac0934a3a2b4756641cd63c1f760d
parent60c50c02f62844b9332872a9bd6d88416889f293 (diff)
Added a warning.
-rw-r--r--data.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/data.c b/data.c
index 00bd5fa..9a250e6 100644
--- a/data.c
+++ b/data.c
@@ -541,6 +541,9 @@ int _object_add(const char *id, d_char *obj, int ow)
/* update the children index of the parent */
xs *c_idx = _object_fn(in_reply_to);
+ if (mtime(c_idx) == 0.0)
+ srv_debug(0, xs_fmt("object_add (warn) parent object not here %s", c_idx));
+
c_idx = xs_replace_i(c_idx, ".json", "_c.idx");
if (!index_in(c_idx, id)) {
@@ -590,7 +593,7 @@ int object_del_by_md5(const char *md5)
int status = 404;
xs *fn = _object_fn_by_md5(md5);
- if (fn != NULL && unlink(fn) != -1) {
+ if (unlink(fn) != -1) {
status = 200;
/* also delete associated indexes */