[issue23407] os.walk always follows Windows junctions
Craig Holmquist
report at bugs.python.org
Sat Jan 14 09:54:07 EST 2017
Craig Holmquist added the comment:
Here's a new patch: now, _Py_attribute_data_to_stat and Py_DeleteFileW will just use the IsReparseTagNameSurrogate macro to determine if the file is a link, so os.walk etc. will know not to follow them. os.readlink, however, will only work with junctions and symbolic links; otherwise it will raise ValueError with "unsupported reparse tag".
This way, there's a basic level of support for all name-surrogate tags, but os.readlink only works with the ones whose internal structure is (semi-) documented.
----------
Added file: http://bugs.python.org/file46289/issue23407-3.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23407>
_______________________________________
More information about the Python-bugs-list
mailing list