Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jun 2024 21:08:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 279774] man(1) displays first file from current directory instead of .so file
Message-ID:  <bug-279774-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279774

            Bug ID: 279774
           Summary: man(1) displays first file from current directory
                    instead of .so file
           Product: Base System
           Version: 14.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: sean@donelan.com

Created attachment 251480
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D251480&action=
=3Dedit
patch for usr.bin/man.sh to check null filename

When a manpage contains a .so link to a second manpage, man(1) displays fir=
st
file in current directory

The function exists() in man.sh uses file globbing to check if file exists.
When called with a null filename, such as when redirecting .so link to new
manpage file, globbing returns the name of the first file in the current
directory.

sean@clifden:~ % zgrep -e "^\.so" /usr/local/share/man/man1/doveadm-backup*
/usr/local/share/man/man1/doveadm-backup.1.gz:.so man1/doveadm-sync.1

sean@clifden:~ % man -w doveadm-backup
a-file-in-directory (source: "/usr/local/share/man/man1/doveadm-sync.1.gz")

Patched result

sean@clifden:/usr/bin % man -w doveadm-backup
/usr/local/share/man/man1/doveadm-sync.1.gz

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279774-227>