summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mandocdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 46b6c3b0..e4ece756 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -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.