-
For cases where $1 has a single path component, like "man", the calculation using `realpath` works correctly, but it's subtly wrong when $1 is "gtk-doc/html", because the symlink path needs to be relative to "/usr/share/gtk-doc", not "/usr/share". As a result, the symbolic link at /usr/share/gtk-doc/html points to runtime/docs/gtk-doc/html, which resolves to /usr/share/gtk-doc/runtime/docs/gtk-doc/html which does not exist. The correct relative path is ../runtime/docs/gtk-doc/html, which resolves to /usr/share/runtime/docs/gtk-doc/html which exists. Happily, `ln -s` has a `--relative` flag which works out the right relative path. This likely regressed in a8dbd2b0, before which the symlinks were absolute. Fixes #738.
106627fd