I had a directory structure (src/...) created by Cygwin's 7za.exe. From a command prompt I ran rmdir /s /q src.
This resulted in error messages (paraphrasing as my DOS shell has long since overflowed):
Cannot delete src/test/unit/geom
The directory is not empty
Browsing to src/test/unit/geom showed that it was indeed empty, so I ran the same rmdir command again. Same error, but pointing at src/test/unit instead. And my Explorer window that was showing the absence of contents in src/test/unit/geom dropped down to src/test/unit.
Three rmdir executions later, it is fully gone.
This is Windows 7 and set CYGWIN=nontsec had been run. I believe this has been the source of build problems for some time now, but until now I hadn't identified the culprit.
What can I do to avoid this in the future? If it happens again, what should I look for in terms of identifying corrupt aspects of the directory structure?