diff options
| author | default <nobody@localhost> | 2025-02-05 09:47:38 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-05 09:47:38 +0100 |
| commit | 4df4f0c5518cfe8ae90d098612e9d131f4a384f5 (patch) | |
| tree | ca7c55fd75cd40fb460388b001a7b62a14e0dfb6 | |
| parent | 879fcd830d172b89f8e8f8300af469ae5727fb7d (diff) | |
Fixed bug in search.
| -rw-r--r-- | data.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -2766,7 +2766,17 @@ xs_list *content_search(snac *user, const char *regex, for (int n = 0; n < 3; n++) { if (md5s[n] != NULL) { xs *fn = _object_fn_by_md5(md5s[n], "content_search"); - double mt = mtime(fn); + double mt; + + while ((mt = mtime(fn)) == 0 && md5s[n] != NULL) { + /* object is not here: move to the next one */ + if (xs_list_next(tls[n], &md5s[n], &c[n])) { + xs_free(fn); + fn = _object_fn_by_md5(md5s[n], "content_search_2"); + } + else + md5s[n] = NULL; + } if (mt > mtime) { newest = n; |