This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, paul.moore, steve.dower, tim.golden, vidartf, zach.ware
Date 2017-08-17.17:56:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502992565.01.0.525137008048.issue31226@psf.upfronthosting.co.za>
In-reply-to
Content
Junctions are sometimes used as links (e.g. mklink /j) and sometimes as volume mount points (e.g. mountvol.exe). GetVolumePathName can be called to distinguish these cases. If a junction is a volume mount point, then its absolute path and volume path are the same. This test is already used in ntpath.ismount().

For a junction link, islink() should return true, readlink() should work, and S_ISDIR() should return false for the lstat() st_mode. For a junction mount point, islink() should return false, readlink() should not work, and S_ISDIR() should return true for the lstat() st_mode.

A helper function could be added in fileutils.c to determine whether a reparse point is a link, based on the file path and reparse tag. Then modify _Py_attribute_data_to_stat() to take `BOOL is_link` instead of `ULONG reparse_tag`.
History
Date User Action Args
2017-08-17 17:56:05eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, vidartf
2017-08-17 17:56:05eryksunsetmessageid: <1502992565.01.0.525137008048.issue31226@psf.upfronthosting.co.za>
2017-08-17 17:56:04eryksunlinkissue31226 messages
2017-08-17 17:56:04eryksuncreate