I even tried rm -rf and that didn't work, which I found rather surprising.
> Smells like somethnig weird in the Cygwin layer.
It turns out that in Cygwin paths starting with /tmp/ get magically
redirected to c:/cygwin/tmp/
I cannot imagine a universe where that would be a good idea, but
apparently the Cygwin authors thought it was.
tempdir returns /tmp/something, and this gets interpreted as
c:/tmp/something by some parts of my script and as
c:/cygwin/tmp/something by other parts of my script (including tempdir
itself).
tempdir does in fact clean up its directory, but not the directory I
thought it was using.
My ugly, non-portable and fragile workaround is to chdir to c: then
prepend the temp directory name with c: before I use it.
Regards,
Allan