mingw_rmdir: set errno=ENOTEMPTY when appropriate
commit3060d1601012050281f0f23ce7eaf8e0381f0eba
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, 25 Aug 2010 10:28:30 +0000 (25 12:28 +0200)
tree0bf15769c5d982be9fb6f3254e979d3fe0be7837
parentaae8856c966383a7118553c939c53942d5fabde7
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