diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-11-28 00:57:29 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-11-28 00:57:29 +0000 |
commit | a0f186516cbc5189f93928704b768794a73d1dad (patch) | |
tree | 2213a629850abb2c8adc26b60ff7f85ff64f9158 /usr.bin | |
parent | adf8e52397d054f53e2b84b8c7877f5afd501330 (diff) |
Put back the chdir(2) to the right man page tree before parsing manuals;
this got lost during the bsd.lv sync in rev. 1.10; oops.
This is required for processing .so links: otherwise, several files
in Xenocara fail to parse and cause ugly complaints instead.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/mandocdb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index 2a6393d2df3..472a4afcbfb 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.13 2011/11/27 23:27:16 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.14 2011/11/28 00:57:28 schwarze Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -27,6 +27,7 @@ #include <stdint.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> #include <db.h> #include "man.h" @@ -374,10 +375,12 @@ mandocdb(int argc, char *argv[]) index_prune(of, db, fbuf, idx, ibuf, &maxrec, &recs, &recsz); - if (OP_UPDATE == op) + if (OP_UPDATE == op) { + chdir(dir); index_merge(of, mp, &dbuf, &buf, hash, db, fbuf, idx, ibuf, maxrec, recs, reccur); + } goto out; } @@ -446,6 +449,7 @@ mandocdb(int argc, char *argv[]) of = of->first; + chdir(dirs.paths[i]); index_merge(of, mp, &dbuf, &buf, hash, db, fbuf, idx, ibuf, maxrec, recs, reccur); } |