diff options
author | Christopher Faylor <me@cgf.cx> | 2000-05-25 21:45:04 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-05-25 21:45:04 +0000 |
commit | 4b62cff84ccdbf4e4d08d0e253974f5cbd4b4e6f (patch) | |
tree | bb9c4280fb147ed3e49ebdc43e0eca3589e64386 | |
parent | 7e06494e35676aaddddfcce363273b4b1f335605 (diff) | |
download | newlib-4b62cff84ccdbf4e4d08d0e253974f5cbd4b4e6f.zip newlib-4b62cff84ccdbf4e4d08d0e253974f5cbd4b4e6f.tar.gz newlib-4b62cff84ccdbf4e4d08d0e253974f5cbd4b4e6f.tar.bz2 |
* dir.cc (rmdir): Use file attributes that have already been discovered by
path_conv.
-rw-r--r-- | winsup/cygwin/ChangeLog | 2 | ||||
-rw-r--r-- | winsup/cygwin/dir.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f846b50..f986939 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,4 +1,4 @@ -Thu May 25 17:01:53 2000 Christopher Faylor <cgf@cygnus.com> +Thu May 25 17:44:25 2000 Christopher Faylor <cgf@cygnus.com> * dir.cc (rmdir): Use file attributes that have already been discovered by path_conv. diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index cce81d8..944313c 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -341,7 +341,8 @@ rmdir (const char *dir) /* Under Windows 9X or on a samba share, ERROR_ACCESS_DENIED is returned if you try to remove a file. On 9X the same error is returned if you try to remove a non-empty directory. */ - if (real_dir.file_attributes () != (DWORD) -1 && !(real_dir.fileattr & FILE_ATTRIBUTE_DIRECTORY)) + if (real_dir.file_attributes () != (DWORD) -1 && + !(real_dir.file_attributes () & FILE_ATTRIBUTE_DIRECTORY)) set_errno (ENOTDIR); else if (os_being_run != winNT) set_errno (ENOTEMPTY); |