diff options
-rw-r--r-- | src/man2html/yelp-man2html.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/man2html/yelp-man2html.c b/src/man2html/yelp-man2html.c index 7bc4e5a2..48e279f4 100644 --- a/src/man2html/yelp-man2html.c +++ b/src/man2html/yelp-man2html.c @@ -3640,7 +3640,15 @@ static char *search_manpath(char *name) } strmaxcpy(smfbuf, manpath[i], LARGE_STR_MAX); strmaxcat(smfbuf, name, LARGE_STR_MAX); - if (stat(smfbuf, &stbuf) !=-1) return smfbuf; + if (stat(smfbuf, &stbuf) !=-1) { + return smfbuf; + } else { + strmaxcpy(smfbuf, manpath[i], LARGE_STR_MAX); + strmaxcat(smfbuf, name, LARGE_STR_MAX); + strmaxcat(smfbuf, ".gz", LARGE_STR_MAX); + if (stat(smfbuf, &stbuf) !=-1) + return smfbuf; + } } return NULL; } |