From e3df22607a8dbfb15b3157a7c39f2d96b029fcec Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 25 May 2000 19:48:45 +0000 Subject: * dir.cc (rmdir): Use file attributes that have already been discovered by path_conv. --- winsup/cygwin/dir.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'winsup/cygwin/dir.cc') diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index dc70ae117..6ab6dae1c 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); -- cgit v1.2.3