From 7ff737e216d9a73815b24bc6c7c226f686817eed Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 22 Aug 2016 16:15:26 +0000 Subject: When trying to edit an existing database with makewhatis(8) -d or -u but reading the database fails, report the full path to the database on standard error, and mention that the database is automatically recreated from scratch. Suggested by espie@. --- mandocdb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index f16652d5..7ae91753 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.227 2016/08/17 20:46:56 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.228 2016/08/22 16:15:26 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2016 Ingo Schwarze @@ -448,10 +448,10 @@ mandocdb(int argc, char *argv[]) if (nodb == 0) dbprune(dba); } else { - /* - * Database missing or corrupt. - * Recreate from scratch. - */ + /* Database missing or corrupt. */ + say(MANDOC_DB, + "%s: Automatically recreating from scratch", + strerror(errno)); exitcode = (int)MANDOCLEVEL_OK; op = OP_DEFAULT; if (0 == treescan()) -- cgit v1.2.3