Antoine Pitrou <pit...@free.fr> added the comment:

> However, the generated (files? and) dirs do not necessarily reflect the 
> current situation as produced by os.listdir.

What do you mean exactly? Another process has re-created "b" in parallel?
This race condition is pretty impossible to solve in the general case (unless 
the filesystem is transactional): even if you call os.listdir() again, a new 
file or dir could appear just before the following call to os.rmdir().

(just for the record, shutil.rmtree already allows you to delete a filesystem 
tree)

----------
nosy: +pitrou

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

Reply via email to