[issue6975] symlinks incorrectly resolved on POSIX platforms

Serhiy Storchaka report at bugs.python.org
Mon Jan 14 09:11:18 CET 2013


Serhiy Storchaka added the comment:

> I don't really understand your algorithm. Why do you need a stack?

Before resolving the symlink we mark the path as unresolved symlink for detecting infinite symlink loops. Before resolving the symlink we mark the path as resolved symlink (and cache the resolved value for speed) for allowing finite symlink recursion.

Here is a test which pathlib fails.

----------
Added file: http://bugs.python.org/file28720/pathlib_resolve_test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6975>
_______________________________________


More information about the Python-bugs-list mailing list