=================================================================== RCS file: /cvs/mandoc/mandocdb.c,v retrieving revision 1.183 retrieving revision 1.184 diff -u -p -r1.183 -r1.184 --- mandoc/mandocdb.c 2015/01/15 04:26:40 1.183 +++ mandoc/mandocdb.c 2015/01/21 22:41:49 1.184 @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.183 2015/01/15 04:26:40 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.184 2015/01/21 22:41:49 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -613,7 +613,11 @@ treescan(void) say(path, "&realpath"); continue; } - if (strstr(buf, basedir) != buf) { + if (strstr(buf, basedir) != buf +#ifdef HOMEBREWDIR + && strstr(buf, HOMEBREWDIR) != buf +#endif + ) { if (warnings) say("", "%s: outside base directory", buf); continue; @@ -818,6 +822,10 @@ filescan(const char *file) start = buf; else if (strstr(buf, basedir) == buf) start = buf + strlen(basedir); +#ifdef HOMEBREWDIR + else if (strstr(buf, HOMEBREWDIR) == buf) + start = buf; +#endif else { exitcode = (int)MANDOCLEVEL_BADARG; say("", "%s: outside base directory", buf);