aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitb135eeb2e6bc52a855d0a282c4a772eecc177a76 (patch)
tree8d08c6033ea61adf216c7e0ad1acc9d361c3a349 /mandocdb.c
parentd7e2ff39afca17f5ebd28417614b0c6422471545 (diff)
downloadmandoc-b135eeb2e6bc52a855d0a282c4a772eecc177a76.tar.gz
mandoc-b135eeb2e6bc52a855d0a282c4a772eecc177a76.tar.zst
mandoc-b135eeb2e6bc52a855d0a282c4a772eecc177a76.zip
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 2a8ab7a0..434b2749 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.251 2017/06/24 14:38:32 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.252 2017/07/15 13:17:49 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
}