[issue13772] listdir() doesn't work with non-trivial symlinks

Antoine Pitrou report at bugs.python.org
Tue Feb 26 15:11:53 CET 2013


Antoine Pitrou added the comment:

> I'm not super-confident about the implementation of the
> path-manipulation functions, and I would prefer to use the Python
> implementations of the path-manipulation (dirname and join) instead.
> If there are any suggestions in this regard, I'd appreciate them.

>From an implementation standpoint, I would indeed prefer the path handling
functions to be written in Python.

>From a principle standpoint, I'm not sure it's a good idea for os.symlink()
to be non-atomic (there's a small race condition between reading the target's
attributes and creating the actual symlink).

Also, since in general you always know whether you're making a link to a
directory or a file, I'm not sure auto-detection is really a plus (except
that it makes things more familiar for Unix developers).

----------

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


More information about the Python-bugs-list mailing list