mingw_rmdir: set errno=ENOTEMPTY when appropriate
commitee0c94612686004b795685062285d561e08409da
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 26 May 2010 10:42:50 +0000 (26 12:42 +0200)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Fri, 1 Oct 2010 22:27:29 +0000 (1 23:27 +0100)
tree7fc27be9aee2f4097bebdce2820f29dc92f9de12
parent68ee5fab35b80c0db2657a84d3bb457a7f31549f
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