aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--mandocdb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 6e61c149..5ce63bcb 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -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.