diff options
-rw-r--r-- | libexec/makewhatis/makewhatis.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libexec/makewhatis/makewhatis.pl b/libexec/makewhatis/makewhatis.pl index 0745b448cf3..00bf38b7cae 100644 --- a/libexec/makewhatis/makewhatis.pl +++ b/libexec/makewhatis/makewhatis.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # ex:ts=8 sw=4: -# $OpenBSD: makewhatis.pl,v 1.15 2001/02/25 09:04:25 espie Exp $ +# $OpenBSD: makewhatis.pl,v 1.16 2001/03/14 10:56:24 espie Exp $ # # Copyright (c) 2000 Marc Espie. # @@ -96,7 +96,11 @@ sub verify_subject my $section = $2; my @mans = split(/\s*,\s*|\s+/, $man); my $base = $filename; - $base =~ s,/[^/]*$,,; + if ($base =~ m|/|) { + $base =~ s,/[^/]*$,,; + } else { + $base = '.'; + } for my $i (@mans) { next if found("$base/$i.*"); # try harder |