mingw_rmdir: set errno=ENOTEMPTY when appropriate
commitab1a11be7858e1f92ee2e4ee1d70fabe7d5fe0ee
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 7 Feb 2011 20:54:01 +0000 (7 21:54 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Feb 2011 23:45:54 +0000 (7 15:45 -0800)
treee1fc25e4c4da01c522fe5e614d6c218da032e1b9
parent4f288100ceed14c65a1e964b2db4aaee4f4199fc
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>
Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c