From 423d5c545be8920113376cd2cf3aa91a34129b22 Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 8 Aug 2014 17:26:59 +1000 Subject: [PATCH] ckdb - make -r optional and point it to ckpool default --- src/ckdb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index 8ce7239f..a44c76c0 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -7783,8 +7783,11 @@ static void check_restore_dir() { struct stat statbuf; - if (!restorefrom) - quit(1, "ERR: '-r dir' required to specify the ckpool hourly ckdb log dir"); + if (!restorefrom) { + restorefrom = strdup("logs"); + if (!restorefrom) + quithere(1, "OOM"); + } if (!(*restorefrom)) quit(1, "ERR: '-r dir' can't be empty");