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@.
-/* $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>
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;
}