aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgi.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-12-08 00:48:28 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-12-08 00:48:28 +0000
commit25437cf313c32ee95dbdaa2ac2757399327eb8ed (patch)
treed53f90e0e579567c9f57f494afc60ca84863ae4b /cgi.c
parenta1eb7bc59e737e8ac3bfb9641b3a576fe375ccac (diff)
downloadmandoc-25437cf313c32ee95dbdaa2ac2757399327eb8ed.tar.gz
mandoc-25437cf313c32ee95dbdaa2ac2757399327eb8ed.tar.zst
mandoc-25437cf313c32ee95dbdaa2ac2757399327eb8ed.zip
Look for man.cgi files in the cache, not under the volume path.
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgi.c b/cgi.c
index bdf303dc..109eb598 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-/* $Id: cgi.c,v 1.16 2011/12/07 16:18:52 kristaps Exp $ */
+/* $Id: cgi.c,v 1.17 2011/12/08 00:48:28 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -730,8 +730,8 @@ pg_show(const struct manpaths *ps, const struct req *req, char *path)
else if (NULL == memchr(fn, '\0', val.size - (fn - cp)))
resp_baddb();
else {
- strlcpy(file, ps->paths[vol], MAXPATHLEN);
- strlcat(file, "/", MAXPATHLEN);
+ strlcpy(file, cache, MAXPATHLEN);
+ strlcpy(file, "/", MAXPATHLEN);
strlcat(file, fn, MAXPATHLEN);
if (0 == strcmp(cp, "cat"))
catman(file);