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, terry.reedy, tim.golden, zach.ware
Date 2017-01-28.08:46:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485593176.21.0.594884897354.issue29366@psf.upfronthosting.co.za>
In-reply-to
Content
Python has no specific use for ERROR_PATH_NOT_FOUND (3) and just maps it to FileNotFoundError -- like the CRT maps it to ENOENT. Even if we wanted listdir() to specially handle this error, given that it's implemented via FindFirstFile, there's nothing that can be done after the fact that's not vulnerable to race conditions. 

Also, to reiterate this point, getting ERROR_PATH_NOT_FOUND instead of ERROR_DIRECTORY (267) when the target is a file seems to be pretty uncommon, much more so than I at first thought. I only see it with VirtualBox shared folders. I don't see it with Microsoft file systems such as NTFS, FAT32, or CDFS.
History
Date User Action Args
2017-01-28 08:46:16eryksunsetrecipients: + eryksun, terry.reedy, paul.moore, tim.golden, r.david.murray, zach.ware, serhiy.storchaka, steve.dower, raylu
2017-01-28 08:46:16eryksunsetmessageid: <1485593176.21.0.594884897354.issue29366@psf.upfronthosting.co.za>
2017-01-28 08:46:16eryksunlinkissue29366 messages
2017-01-28 08:46:15eryksuncreate