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.

classification
Title: os.listdir doesn't check error code from FindNextFile
Type: Stage:
Components: Windows Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: loewis, rupole
Priority: normal Keywords:

Created on 2006-07-18 07:35 by rupole, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg29196 - (view) Author: Roger Upole (rupole) Date: 2006-07-18 07:35
The Windows implementation of listdir returns 
successfully as soon as FindNextFile returns False, 
without checking that GetLastError returns 
ERROR_NO_MORE_FILES.  If the operation is interrupted 
(eg removable media ejected, network connection to UNC 
path lost, and so on) an incomplete directory listing 
is returned instead of throwing an exception.
This behaviour exists in 2.4.3 and 2.5b2.
msg29197 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-07-24 12:58
Logged In: YES 
user_id=21627

Thanks for the report. Fixed with r50797 and r50798
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43684
2006-07-18 07:35:41rupolecreate