Author eryksun
Recipients Michael.Felt, eryksun, jkloth, vstinner
Date 2018-10-02.20:35:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I confirm that in a junction point

This path-parsing bug that strips a trailing slash occurs when a traversed directory is a reparse point, such as a mount-point (junction) or directory symbolic link. It may be limited to just the NTFS and ReFS file-system drivers, which is all I tested. Or it may be a bug in the I/O manager itself, which actually implements the name grafting for Microsoft's mount-point (0xA0000003) and symlink (0xA000000C) reparse tags.

I thought the suggested patch was ok because it followed the pattern of existing code that prevents opening directories on Unix. But I can see the distinction in that the latter is implementing behavior policy rather than working around a platform bug. Also, while _Py_open and _Py_fopen do allow opening a directory on a Linux box, in apparent violation of this policy, these are private, internal functions, and there's no use that I'm aware of in the CPython implementation for directory FDs or FILE streams opened this way.
Date User Action Args
2018-10-02 20:35:56eryksunsetrecipients: + eryksun, vstinner, jkloth, Michael.Felt
2018-10-02 20:35:56eryksunsetmessageid: <>
2018-10-02 20:35:56eryksunlinkissue34711 messages
2018-10-02 20:35:56eryksuncreate