diff options
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -541,6 +541,9 @@ int _object_add(const char *id, d_char *obj, int ow) | |||
| 541 | /* update the children index of the parent */ | 541 | /* update the children index of the parent */ |
| 542 | xs *c_idx = _object_fn(in_reply_to); | 542 | xs *c_idx = _object_fn(in_reply_to); |
| 543 | 543 | ||
| 544 | if (mtime(c_idx) == 0.0) | ||
| 545 | srv_debug(0, xs_fmt("object_add (warn) parent object not here %s", c_idx)); | ||
| 546 | |||
| 544 | c_idx = xs_replace_i(c_idx, ".json", "_c.idx"); | 547 | c_idx = xs_replace_i(c_idx, ".json", "_c.idx"); |
| 545 | 548 | ||
| 546 | if (!index_in(c_idx, id)) { | 549 | if (!index_in(c_idx, id)) { |
| @@ -590,7 +593,7 @@ int object_del_by_md5(const char *md5) | |||
| 590 | int status = 404; | 593 | int status = 404; |
| 591 | xs *fn = _object_fn_by_md5(md5); | 594 | xs *fn = _object_fn_by_md5(md5); |
| 592 | 595 | ||
| 593 | if (fn != NULL && unlink(fn) != -1) { | 596 | if (unlink(fn) != -1) { |
| 594 | status = 200; | 597 | status = 200; |
| 595 | 598 | ||
| 596 | /* also delete associated indexes */ | 599 | /* also delete associated indexes */ |