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-26.12:36:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1485434174.2.0.958765930846.issue29366@psf.upfronthosting.co.za>
In-reply-to
Content
> FindFirstFile naturally fails with ERROR_PATH_NOT_FOUND

Getting this error actually depends on the file system. I don't see it with NTFS, which returns STATUS_NOT_A_DIRECTORY, which gets translated to ERROR_DIRECTORY. On the other hand, VboxSF (VirtualBox shared folder) returns STATUS_OBJECT_PATH_NOT_FOUND, which gets translated to ERROR_PATH_NOT_FOUND.

Also, there are many possible errors when trying to list a path on a device that isn't managed by a file system (e.g. \\.\PhysicalDrive0). The device can return a status value that FindFirstFile doesn't special case, such as STATUS_UNSUCCESSFUL, STATUS_NOT_FOUND, or STATUS_OBJECT_NAME_INVALID. The NtOpenFile call may even succeed, but then the NtQueryDirectoryFile will probably fail with STATUS_INVALID_DEVICE_REQUEST.
History
Date User Action Args
2017-01-26 12:36:14eryksunsetrecipients: + eryksun, paul.moore, tim.golden, r.david.murray, zach.ware, serhiy.storchaka, steve.dower, raylu
2017-01-26 12:36:14eryksunsetmessageid: <1485434174.2.0.958765930846.issue29366@psf.upfronthosting.co.za>
2017-01-26 12:36:14eryksunlinkissue29366 messages
2017-01-26 12:36:13eryksuncreate