Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:

* dir.cc (rmdir): Correct the manner in checking the target directory.
This commit is contained in:
Corinna Vinschen 2000-05-25 10:27:36 +00:00
parent 154110f5d3
commit 382541f2f2
2 changed files with 6 additions and 1 deletions

View 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,

View 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);