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, r.david.murray, raylu, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Date 2017-01-25.20:38:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485376702.54.0.00210002602068.issue29366@psf.upfronthosting.co.za>
In-reply-to
Content
Python appends "\*.*" to the path, so in the case in which the leaf element is a file, FindFirstFile naturally fails with ERROR_PATH_NOT_FOUND.

Python 3.5+ could maybe switch to calling CreateFile to open a handle and GetFileInformationByHandleEx to get the FILE_ID_BOTH_DIR_INFO (added in Vista, so this couldn't be backported to 2.7). It would first have to get the FILE_BASIC_INFO for the file attributes to ensure that the target is a directory. This could also support listing directories by file descriptor on Windows, since the CRT has O_OBTAIN_DIR (0x2000) for opening a directory.
History
Date User Action Args
2017-01-25 20:38:22eryksunsetrecipients: + eryksun, paul.moore, tim.golden, r.david.murray, zach.ware, serhiy.storchaka, steve.dower, raylu
2017-01-25 20:38:22eryksunsetmessageid: <1485376702.54.0.00210002602068.issue29366@psf.upfronthosting.co.za>
2017-01-25 20:38:22eryksunlinkissue29366 messages
2017-01-25 20:38:22eryksuncreate