You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run os.path.realpath() on it, and it recurses
infinitely (until the stack limit is hit):
>>> import os
>>> os.path.realpath('/home/amk/infinite')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/posixpath.py", line 416, in
realpath
return realpath(newpath)
os.path.realpath() should be fixed; /home/amk/infinite
is a perfectly good path, though it can't be followed.
Applied as rev. 1.67 in 2.4a2 and rev. 1.62.6.2 in 2.3.5 with only minor
cleanup.
loewis commented on Aug 2, 2004
loewismannequin
Mannequin
More actions
Logged In: YES
user_id=21627
The code that has been committed is incorrect if the link to
be resolved is relative. _resolve_link uses abspath to
determine whether the link is absolute. This function
returns an absolute path (possibly using getcwd); the
function that should have been used is isabs().
Activity
akuchling commentedon Apr 5, 2004
Create a symlink pointing to itself:
ln -s infinite infinite
Run os.path.realpath() on it, and it recurses
infinitely (until the stack limit is hit):
os.path.realpath() should be fixed; /home/amk/infinite
is a perfectly good path, though it can't be followed.
akuchling commentedon Jun 5, 2004
Logged In: YES
user_id=11375
Patch attached; review requested.
brettcannon commentedon Jul 10, 2004
Logged In: YES
user_id=357491
Applied as rev. 1.67 in 2.4a2 and rev. 1.62.6.2 in 2.3.5 with only minor
cleanup.
loewis commentedon Aug 2, 2004
Logged In: YES
user_id=21627
The code that has been committed is incorrect if the link to
be resolved is relative. _resolve_link uses abspath to
determine whether the link is absolute. This function
returns an absolute path (possibly using getcwd); the
function that should have been used is isabs().
akuchling commentedon Aug 3, 2004
Logged In: YES
user_id=11375
Fixed in 2.3-maint and on the trunk.