mingw_rmdir: set errno=ENOTEMPTY when appropriate
commitf02dbc1701773693043a05c07230b3210ebc7ed0
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 26 May 2010 10:42:50 +0000 (26 12:42 +0200)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 26 May 2010 10:45:50 +0000 (26 12:45 +0200)
treefa86c9a2bde455bb426bb202141dd80ec6a69cde
parent401233d8bcaf944b667ecba06968cb0cd6bd9a56
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