Code

mingw_rmdir: set errno=ENOTEMPTY when appropriate
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 14 Dec 2010 22:28:30 +0000 (23:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Dec 2010 23:36:43 +0000 (15:36 -0800)
commit13d396f68c8b1fbb5cd090de8faa046a27d9a6eb
tree29187a880466dfafbd6948425e8b8b94578fe261
parent6e5d8b1b6aa77354f0f87604e877d0e027a25bae
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