This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients giampaolo.rodola, martin.panter, mkovtun, santoso.wijaya, terry.reedy, vstinner, wm
Date 2011-08-20.06:03:25
SpamBayes Score 0.00083088473
Marked as misclassified No
Message-id <1313820206.83.0.0724967152182.issue11397@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-08-20 06:03:26martin.pantersetrecipients: + martin.panter, terry.reedy, vstinner, giampaolo.rodola, santoso.wijaya, wm, mkovtun
2011-08-20 06:03:26martin.pantersetmessageid: <1313820206.83.0.0724967152182.issue11397@psf.upfronthosting.co.za>
2011-08-20 06:03:26martin.panterlinkissue11397 messages
2011-08-20 06:03:25martin.pantercreate