From 4ba2b2cc08b4390ee3d0fb53289b92b30a5d9a77 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 6 Dec 2014 01:23:24 +0000 Subject: When opening mandoc.db fails, tell the user in which directory. Improving an unhelpful error message reported by millert@. --- mansearch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mansearch.c') diff --git a/mansearch.c b/mansearch.c index 89749151..75b340bf 100644 --- a/mansearch.c +++ b/mansearch.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -246,7 +247,8 @@ mansearch(const struct mansearch *search, SQLITE_OPEN_READONLY, NULL); if (SQLITE_OK != c) { - perror(MANDOC_DB); + fprintf(stderr, "%s/%s: %s\n", + paths->paths[i], MANDOC_DB, strerror(errno)); sqlite3_close(db); continue; } -- cgit