From 3c042f1c04abf0fec8866a305452f7fd2ac8639c Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 1 Sep 2014 22:45:53 +0000 Subject: In man(1) mode, change to the right directory before starting the parser, just like traditional man(1) does, such that .so links have a chance to work. After this point, we don't need the current directory for anything else before exit, so we don't need to worry about getting back and we can safely ignore failure. --- mansearch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mansearch.c') diff --git a/mansearch.c b/mansearch.c index 0ede3e66..a8a37a96 100644 --- a/mansearch.c +++ b/mansearch.c @@ -1,4 +1,4 @@ -/* $Id: mansearch.c,v 1.46 2014/08/21 20:29:07 schwarze Exp $ */ +/* $Id: mansearch.c,v 1.47 2014/09/01 22:45:53 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons * Copyright (c) 2013, 2014 Ingo Schwarze @@ -335,6 +335,7 @@ mansearch(const struct mansearch *search, maxres, sizeof(struct manpage)); } mpage = *res + cur; + mpage->ipath = i; mpage->sec = 10; mpage->form = mp->form; buildnames(mpage, db, s, mp->pageid, -- cgit v1.2.3