[Python-Dev] Add os.path.resolve to simplify the use of os.readlink

Armin Ronacher armin.ronacher at active-4.com
Thu Jun 21 13:10:44 CEST 2012


Hi,

> Am 21.06.2012 12:23, schrieb Armin Ronacher:
> Does the code handle a chain of absolute and relative symlinks
> correctly, for example a relative symlink that points to another
> relative symlink in a different directory that points to a file in a
> third directry?
No, but that's a good point.  It should attempt to resolve these in a loop
until it either loops too often (would have to check the POSIX spec for a
reasonable value) or until it terminates by finding an actual file or
directory.


Regards,
Armin



More information about the Python-Dev mailing list