From f69b02612e9584ca3cd0493cb7a33aa06467c7fb Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 11 Apr 2024 11:41:22 +1000 Subject: [PATCH] * source/files : fix on file gone for a long time --- src/sources/files.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sources/files.c b/src/sources/files.c index b4366a4..5d2b7de 100644 --- a/src/sources/files.c +++ b/src/sources/files.c @@ -215,8 +215,9 @@ next(cfg_t *cfg, char *buf, size_t bufsize, bool reset) { for (f2b_file_t *file = cfg->current; file != NULL; file = file->next) { if (file_rotated(cfg, file)) file_close(file); - if (file->fd == NULL && !file_open(file, NULL)) { - log_msg(cfg, error, "can't open file: %s", file->path); + if (file->fd == NULL) { + if (!file_open(file, NULL)) + log_msg(cfg, error, "can't open file: %s", file->path); continue; } if (file_getline(cfg, file, buf, bufsize))