]> git.tuebingen.mpg.de Git - tfortune.git/commit
Make errors from regfile_iter_new() non-fatal.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 16 Jun 2019 12:04:44 +0000 (14:04 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 19 Jun 2019 09:33:08 +0000 (11:33 +0200)
commit1e2f1e61cf6865df93fda61fa4808132afb72725
tree6d04649c9a76d3356cd5bae28f166d1f25942cf4
parent0c39a7e8f0393d0c97cbecca10590afce51abb8f
Make errors from regfile_iter_new() non-fatal.

The callers of the regfile iter API already handle the case of no
epigrams or tag expressions just fine. In particular, the stats
command can still print meaningful output if the tag expression
directory does not exist, which is a perfectly valid setup.

This patch modifies regfile_iter_new() to no longer abort but merely
print a log message and return NULL if opendir() fails. The various
accessors of the regfile iter API have to be adjusted to deal with
NULL pointers but no changes to tfortune.c are required.
util.c