From 1fca8b81889f0dda248d9b75d9b095a64bcd7c3c Mon Sep 17 00:00:00 2001 From: kanoi Date: Sat, 6 Dec 2014 08:46:28 +1100 Subject: [PATCH] ckdb - abort if any compressed files return no data - also true if the decompress command doesn't exist --- src/ckdb.c | 9 +++++++-- src/ckdb.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index abc7e4b0..22a9d01b 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -2771,9 +2771,14 @@ static bool reload_from(tv_t *start) count, count == 1 ? "" : "s", filename); total += count; - if (apipe) + if (apipe) { pclose(fp); - else + if (count == 0) { + quithere(1, "ABORTING - No data returned from " + "compressed file \"%s\"", + filename); + } + } else fclose(fp); free(filename); if (everyone_die || matched) diff --git a/src/ckdb.h b/src/ckdb.h index 0386852d..ee70868e 100644 --- a/src/ckdb.h +++ b/src/ckdb.h @@ -52,7 +52,7 @@ #define DB_VLOCK "1" #define DB_VERSION "0.9.6" -#define CKDB_VERSION DB_VERSION"-0.730" +#define CKDB_VERSION DB_VERSION"-0.731" #define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL_HERE __FILE__, __func__, __LINE__