eryksun added the comment: To check for a link on Windows, os.walk calls ntpath.islink, which calls os.lstat. Currently the os.lstat implementation only sets S_IFLNK for symbolic links. attribute_data_to_stat could also check for junctions (IO_REPARSE_TAG_MOUNT_POINT). For consistency, os.readlink should also read junctions (rdb->MountPointReparseBuffer).
islink https://hg.python.org/cpython/file/7b493dbf944b/Lib/ntpath.py#l239 attribute_data_to_stat https://hg.python.org/cpython/file/7b493dbf944b/Modules/posixmodule.c#l1515 win_readlink https://hg.python.org/cpython/file/7b493dbf944b/Modules/posixmodule.c#l10056 REPARSE_DATA_BUFFER https://hg.python.org/cpython/file/7b493dbf944b/Modules/winreparse.h#l11 ---------- components: +Windows nosy: +eryksun, steve.dower, tim.golden, zach.ware versions: +Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23407> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com