On Thu, Sep 02, 2004, Tim Peters wrote: > > [Tim] >>> The cause: Windows has low-level hooks for apps that want to >>> monitor changes to the filesystem. For example, virus scanners >>> use those heavily. Coernic also uses them, to reindex changed >>> files in the background. So it can keep a file open beyond the time >>> Python thinks it deleted it, and then trying to rmdir its parent >>> directory fails (because the directory isn't really empty yet). > > [Aahz] >> What happens when you use Windows Exploder to delete the folder? > > I didn't try Explorer specifically. Since I was in a DOS box anyway, > I used rmdir/s to clean it out. I'm sure using Explorer would have > worked too. > > This is a timing problem. By the time I can click on the folder to > delete it in Explorer, or by the time I can type "rmdir/s xx", > Copernic is long done reindexing the files, so there's no problem > nuking the directory then. shutil.rmtree issues the rmdir at machine > speed. Question is, what happens when you use Explorer while Coernic is busy inside a folder? If it barfs, then I think it's reasonable for rmtree() to barf. Or are you saying that it's not possible to make that test? -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "I saw `cout' being shifted "Hello world" times to the left and stopped right there." --Steve Gonedes
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4