source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Improve rev.
@ 2017-07-15 13:18 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-07-15 13:18 UTC (permalink / raw)
  To: source

Log Message:
-----------
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@.

Modified Files:
--------------
    mandoc:
        mandocdb.c

Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandocdb.c,v
retrieving revision 1.251
retrieving revision 1.252
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.251 -r1.252
--- mandocdb.c
+++ 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;
 	}
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-15 13:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-15 13:18 mandoc: Improve rev schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).