mingw_rmdir: set errno=ENOTEMPTY when appropriate
commit7037f5e854e658ab4abfdbc00bd503ecda25b763
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 26 May 2010 10:42:50 +0000 (26 12:42 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 28 Dec 2010 17:56:05 +0000 (28 18:56 +0100)
tree6cebcec4935f0fc366ded75b6889fe53ab9effc8
parent984163566c33de7147c223bc40736fdc4786928f
mingw_rmdir: set errno=ENOTEMPTY when appropriate

On Windows, EACCES overrules ENOTEMPTY when calling rmdir(). But if the
directory is busy, we only want to retry deleting the directory if it
is empty, so test specifically for that case and set ENOTEMPTY rather
than EACCES.

Noticed by Greg Hazel.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
compat/mingw.c