Message279801
You need to cache the names up front because the loop is unlinking entries, and readdir isn't consistent when the directory entries are mutated between calls. https://github.com/kripken/emscripten/issues/2528
FindFirstFile/FindNextFile likely has similar issues, even if they're not consistently seen (due to DeleteFile itself not guaranteeing deletion until the last handle to the file is closed).
scandir might save some stat calls, but you'd need to convert it from generator to list before the loop begins, which would limit the savings a bit. |
|
Date |
User |
Action |
Args |
2016-10-31 16:37:10 | josh.r | set | recipients:
+ josh.r, serhiy.storchaka, xiang.zhang, enkore |
2016-10-31 16:37:10 | josh.r | set | messageid: <1477931830.65.0.116938256174.issue28564@psf.upfronthosting.co.za> |
2016-10-31 16:37:10 | josh.r | link | issue28564 messages |
2016-10-31 16:37:10 | josh.r | create | |
|