summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-22 16:15:26 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-22 16:15:26 +0000
commit41f393601155f987e273b2a177289e9b3deaecea (patch)
treefe6aefaef115d5e3b6b4a0bba907780076fdfadb
parent1c6894f509f4d5465a9c42324e61b4af5dabb3b9 (diff)
downloadmandoc-41f393601155f987e273b2a177289e9b3deaecea.tar.gz
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@.
-rw-r--r--mandocdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 16dda371..328abac7 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -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())