mingw_rmdir: set errno=ENOTEMPTY when appropriate
commite1603d449ee1f2c69b66e55f828be6c80b2fddd7
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, 10 Sep 2010 22:44:12 +0000 (10 23:44 +0100)
tree99a405394648f73a5a66df561feaadd849cda8de
parent76b6733b54dac1bd79449d847a79ef43d880c86d
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