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 (2)
Priority: normal Keywords

Created on 2006-07-18 07:35 by rupole, last changed 2006-07-24 12:58 by loewis.

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) 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
2006-07-18 07:35:41rupolecreate