diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-27 16:22:09 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-27 16:22:09 +0000 |
commit | 9db529ea6c2a10761e905b75074060e913316170 (patch) | |
tree | 7c18fae73cc16eac8cc7d8219972861a1fe21255 /mandocdb.c | |
parent | 1a83fe0518c070d90a4989d137927b786a7732d4 (diff) | |
download | mandoc-9db529ea6c2a10761e905b75074060e913316170.tar.gz |
When makewhatis(8) scans a tree, ignore trailing garbage on filenames.
This is relevant because some ports install files like man1/xsel.1x,
as reported by patrick keshishian <pkeshish at gmail dot com> on misc@.
We can probably improve functionality and simplify the code by ignoring
file name extensions altogether; we already know the section number from
the name of the directory. But so close to lock, i'm keeping the fix
minimal.
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -672,7 +672,8 @@ treescan(void) say(path, "Skip pdf"); continue; } else if ( ! use_all && - ((FORM_SRC == dform && strcmp(fsec, dsec)) || + ((FORM_SRC == dform && + strncmp(fsec, dsec, strlen(dsec))) || (FORM_CAT == dform && strcmp(fsec, "0")))) { if (warnings) say(path, "Wrong filename suffix"); |