homepage

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 serhiy.storchaka
Recipients pitrou, serhiy.storchaka
Date 2013年12月05日.13:05:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386248741.26.0.839977735328.issue19887@psf.upfronthosting.co.za>
In-reply-to
Content
Path.resolve() also fails when last link is absolute.
mkdir testdir
ln -s 0/0 testdir/1
ln -s 1/1 testdir/2
ln -s "$(readlink -f testdir)" testdir/0
Path('testdir/2').resolve() fails:
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/home/serhiy/py/cpython/Lib/pathlib.py", line 1017, in resolve
 s = self._flavour.resolve(self)
 File "/home/serhiy/py/cpython/Lib/pathlib.py", line 273, in resolve
 raise RuntimeError("Symlink loop from %r" % cur)
RuntimeError: Symlink loop from '/home/serhiy/py/cpython/testdir/0'
Here is a patch which implements an algorithm similar to the algorithm used in posixpath.realpath().
History
Date User Action Args
2013年12月05日 13:05:41serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou
2013年12月05日 13:05:41serhiy.storchakasetmessageid: <1386248741.26.0.839977735328.issue19887@psf.upfronthosting.co.za>
2013年12月05日 13:05:41serhiy.storchakalinkissue19887 messages
2013年12月05日 13:05:41serhiy.storchakacreate

AltStyle によって変換されたページ (->オリジナル) /