]> sourceware.org Git - newlib-cygwin.git/commitdiff
Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 25 May 2000 10:27:36 +0000 (10:27 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 25 May 2000 10:27:36 +0000 (10:27 +0000)
        * dir.cc (rmdir): Correct the manner in checking the target directory.

winsup/cygwin/ChangeLog
winsup/cygwin/dir.cc

index cb0156de607439d1afee0648b2c3e84ce4e6b15a..1b4d0087f0f863af493f313cbcef1f0cf70c19d0 100644 (file)
@@ -1,3 +1,7 @@
+2000-05-25  Kazuhiro Fujieda <fujieda@jaist.ac.jp>
+
+       * dir.cc (rmdir): Correct the manner in checking the target directory.
+
 Wed May 24 21:59:00 2000  Corinna Vinschen <corinna@vinschen.de>
 
        * dir.cc (writable_directory): Comment out previous code,
index 741be8480e8056f935dcfcbf2ede8148e902ea20..dc70ae117d337340f30438b340ceb0ee1663e81f 100644 (file)
@@ -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 (GetFileAttributes (real_dir.get_win32()) != FILE_ATTRIBUTE_DIRECTORY)
+     int attr = GetFileAttributes (real_dir.get_win32());
+     if (attr != -1 && !(attr & FILE_ATTRIBUTE_DIRECTORY))
        set_errno (ENOTDIR);
      else if (os_being_run != winNT)
        set_errno (ENOTEMPTY);
This page took 0.032292 seconds and 5 git commands to generate.