From 4af237d43a53c0920cb959d11dfa0e608325591e Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 30 Apr 2015 13:27:02 +0200 Subject: [PATCH] Check for nonzero logbook files if index is rebuilt. Might help for logbook files hosted on remote file systems. --- src/elogd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/elogd.c b/src/elogd.c index 54a15150..fe9bca10 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -4116,6 +4116,11 @@ int el_build_index(LOGBOOK * lbs, BOOL rebuild) lbs->el_index[i].offset); } + if (rebuild && n == 0) { + eprintf("Logbook files seem to have disappeared, aborting program.\n"); + assert(rebuild && n > 0); + } + return EL_SUCCESS; }