[pcre-dev] [Bug 2794] pcre2grep "-r" option needs to detect …

Top Pagina
Delete this message
Auteur: admin
Datum:  
Aan: pcre-dev
Oude Onderwerpen: [pcre-dev] [Bug 2794] New: pcre2grep directory recursion has trouble with certain symlinks on macOS
Onderwerp: [pcre-dev] [Bug 2794] pcre2grep "-r" option needs to detect endless symlink recursion
https://bugs.exim.org/show_bug.cgi?id=2794

--- Comment #7 from Thomas Tempelmann <tempelmann@???> ---
The alternative would be to detect the recursion yourself. To do that, you'd
have to get the resolved path (without symlinks) for every dir you're scanning,
and see if that new path is a complete sub-path of the parent path.

This is fairly easy to add, with conditional compiling for BSD+Linux, where
you'd call `realpath()` on the current path, then check if that's a path you've
been at already.

Adding that I could do as well. Should be quicker and easier to verify.

--
You are receiving this mail because:
You are on the CC list for the bug.