diff options
-rw-r--r-- | mandocdb.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.126 2014/04/03 16:27:28 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.127 2014/04/03 21:45:31 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -462,6 +462,11 @@ main(int argc, char *argv[]) } else manpath_parse(&dirs, path_arg, NULL, NULL); + if (0 == dirs.sz) { + exitcode = (int)MANDOCLEVEL_BADARG; + say("", "Empty manpath"); + } + /* * First scan the tree rooted at a base directory, then * build a new database and finally move it into place. |