Martin Panter <[email protected]> added the comment:
Another infinite loop that isn't caught in Python 3.2.1: With the symbolic link
link => link/inside
a readlink("link") call will keep looping.
Anyhow, the proposed solution in issue11397_py32_2.patch does not account for
paths with multiple independent references to the same link. Example link:
here => .
Calling readlink("here/here") for me should return "/media/disk/home/vadmium"
(my current directory, containing the "here" link), but the proposed version
returns an "/media/disk/home/vadmium/here/here" (incompletely resolved).
I suggest something similar to "realpath_link_stack.py" I am attaching. I think
the main difference is it pops each link off the cycle-detection stack after it
has been resolved.
----------
nosy: +vadmium
Added file: http://bugs.python.org/file22954/realpath_link_stack.py
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11397>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com