diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-09-02 14:03:30 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-09-02 14:03:30 +0000 |
commit | 287b10ca057f74e3816bb43d947b7498629f1459 (patch) | |
tree | 1a06aaef4514f7987eda2c569af0a09b470645b5 | |
parent | fa9e887ca5bac200e7f3b9d1802cafffbc71d3b9 (diff) | |
download | mandoc-287b10ca057f74e3816bb43d947b7498629f1459.tar.gz |
When "makewhatis -d" tries to add to a database that doesn't (yet) exist,
silently create it from scratch instead of printing a warning.
The annoying warning message was reported by ajacoutot@, and espie@
convincingly argues that a non-existing database can be considered
equivalent to an empty one.
-rw-r--r-- | mandocdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -449,9 +449,9 @@ mandocdb(int argc, char *argv[]) dbprune(dba); } else { /* Database missing or corrupt. */ - say(MANDOC_DB, - "%s: Automatically recreating from scratch", - strerror(errno)); + if (op != OP_UPDATE || errno != ENOENT) + say(MANDOC_DB, "%s: Automatically recreating" + " from scratch", strerror(errno)); exitcode = (int)MANDOCLEVEL_OK; op = OP_DEFAULT; if (0 == treescan()) |