Follow-up Comment #3, bug #66135 (group findutils):

A broken symbolic link is not the same thing as a symbolic link loop.

A broken link cannot be dereferenced:

$ ln -s broken link
$ stat -L link
stat: cannot statx 'link': No such file or directory
$ 


However, contrary to what was said ("You can't dereference this link at all"),
a symbolic link loop CAN be dereferenced. And that's the problem, the
dereferencing never ends:

$ ln -s link link
$ stat -L link
stat: cannot statx 'link': Too many levels of symbolic links
$ 


Here, *stat* does dereference the symbolic link, but:
1. detecting the loop (the same way as *find* does)
2. decides to stop (the same way as *find* does)
3. generates an error (sometimes the same error message as *find* and
sometimes … NOT -- and that's the problem)
                                                                              
           
To conclude: As I stated in my original submission, a file system loop is a
file system loop; file system loop detection is file system loop detection.
* There are some command lines where the type of file system loop
(_link-to-link_ vs _link-to-directory-to-link_) matters.
        * Example: "stat -L" generates an error for _link-to-link_ loops and a 
normal
output for _link-to-directory-to-link_ loops.
* However, in situations where it generates an error message, it should return
the exact same error message (preferably the most useful one as explained in
my original submission).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66135>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to