Eryk Sun added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29366>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to