'Find the target member of a symlink or hardlink member in the
archive.'

def _find_link_target(self, tarinfo):

    if tarinfo.issym():
        linkname = '/'.join(filter(None, (os.path.dirname(tarinfo.name), tarinfo.linkname)))
        limit = None
    else:
        linkname = tarinfo.linkname
        limit = tarinfo
    member = self._getmember(linkname, tarinfo=limit, normalize=True)
    if (member is None):
        raise KeyError(('linkname    %r    not    found' % linkname))
    return member
