summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-07-15 13:17:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-07-15 13:17:49 +0000
commit2c51232f12fcfb70f8fde104948760fcd8d39a5c (patch)
tree33c929ca721c831bb2f3c3a029bf9ad15dd20485 /mandocdb.c
parent5061b78c754ac78dd9302b31acfbb5227a2d3a54 (diff)
downloadmandoc-2c51232f12fcfb70f8fde104948760fcd8d39a5c.tar.gz
Improve rev. 1.250 further:
If a database is empty, we already don't write a database file and delete an existing one. If none exists, that only means the database was empty and remains so, which is not an error. So don't nag about it, in particular because that would be a weekly(8) annoyance. Issue reported by jmc@.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 75a874d9..327f70e3 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -2130,7 +2130,7 @@ dbwrite(struct dba *dba)
dba_array_start(dba->pages);
if (dba_array_next(dba->pages) == NULL) {
- if (unlink(MANDOC_DB) == -1)
+ if (unlink(MANDOC_DB) == -1 && errno != ENOENT)
say(MANDOC_DB, "&unlink");
return;
}