commit 23c433e

default  ·  2023-02-22 17:15:48 +0000 UTC
parent 60c50c0
Added a warning.
1 files changed,  +4, -1
M data.c
M data.c
+4, -1
 1@@ -541,6 +541,9 @@ int _object_add(const char *id, d_char *obj, int ow)
 2             /* update the children index of the parent */
 3             xs *c_idx = _object_fn(in_reply_to);
 4 
 5+            if (mtime(c_idx) == 0.0)
 6+                srv_debug(0, xs_fmt("object_add (warn) parent object not here %s", c_idx));
 7+
 8             c_idx = xs_replace_i(c_idx, ".json", "_c.idx");
 9 
10             if (!index_in(c_idx, id)) {
11@@ -590,7 +593,7 @@ int object_del_by_md5(const char *md5)
12     int status = 404;
13     xs *fn     = _object_fn_by_md5(md5);
14 
15-    if (fn != NULL && unlink(fn) != -1) {
16+    if (unlink(fn) != -1) {
17         status = 200;
18 
19         /* also delete associated indexes */