From 88fa8517840405b6468f965d4f2ff60cb7d09ac4 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 21 Aug 2014 08:46:35 +0000 Subject: [PATCH] * dir.cc (rmdir): Don't skip deleting fh in the ENOTEMPTY case. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/dir.cc | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 4bf1b04c7..c58f054da 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2014-08-21 Corinna Vinschen + + * dir.cc (rmdir): Don't skip deleting fh in the ENOTEMPTY case. + 2014-08-20 Corinna Vinschen * tls_pbuf.h (tmp_pathbuf::tmp_pathbuf): Convert to inline method. diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index b1035ba49..bdc1a859b 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -359,10 +359,7 @@ rmdir (const char *dir) else if (has_dot_last_component (dir, false)) set_errno (EINVAL); else if (isdev_dev (fh->dev ())) - { - set_errno (ENOTEMPTY); - goto done; - } + set_errno (ENOTEMPTY); else if (!fh->rmdir ()) res = 0;