mingw_rmdir: set errno=ENOTEMPTY when appropriate
commitc2b7afc7a9f10a11edc202435591692d9b499672
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 26 May 2010 10:42:50 +0000 (26 12:42 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 5 Jul 2010 09:09:10 +0000 (5 11:09 +0200)
tree637d34f4cbcb87dbcb668723542a175484a0e4c5
parent7c81a2897e8cf55612d6334a751b62478761929c
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