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

Antoine Pitrou report at bugs.python.org
Thu Jan 12 02:43:05 CET 2012

Antoine Pitrou <pitrou at free.fr> added the comment:

> I think this is because "Lib\\bar" is NOT being created as a directory
> symlink, but rather as a regular one.

Ha! I didn't even know about that option. Thanks for noticing.

> As such, the documentation for symlink where it states the optional
> target_is_directory=False argument should be automatically detect
> whether the source is a file or directory does not hold true.

I don't know if auto-detection is a good idea. Of a course, from a Unix
user's perspective, Windows' behaviour doesn't make a lot of sense.
Especially when functions other than listdir() work fine anyway.

----------

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