diff options
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/dir.cc | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1b4d008..df6cdbc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Thu May 25 13:29:23 2000 Christopher Faylor <cgf@cygnus.com> + + * dir.cc (rmdir): Use file attributes that have already been discovered + by path_conv. + 2000-05-25 Kazuhiro Fujieda <fujieda@jaist.ac.jp> * dir.cc (rmdir): Correct the manner in checking the target directory. @@ -58,7 +63,7 @@ Mon May 16 23:39:00 2000 Corinna Vinschen <corinna@vinschen.de> * dir.cc (rmdir): Care for misleading error messages when trying to remove a directory on a samba share. - Eliminate superfluous else branch. + Eliminate superfluous else branch. * syscalls.cc (_rename): Additional check for ERROR_FILE_EXISTS if MoveFile fails. diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index dc70ae1..6ab6dae 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -341,8 +341,7 @@ 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. */ - int attr = GetFileAttributes (real_dir.get_win32()); - if (attr != -1 && !(attr & FILE_ATTRIBUTE_DIRECTORY)) + if (real_dir.fileattr != (DWORD) -1 && !(real_dir.fileattr & FILE_ATTRIBUTE_DIRECTORY)) set_errno (ENOTDIR); else if (os_being_run != winNT) set_errno (ENOTEMPTY); |