Patch by Kazuhiro Fujieda <fujieda@jaist.ac.jp>:
* dir.cc (rmdir): Correct the manner in checking the target directory.
This commit is contained in:
parent
154110f5d3
commit
382541f2f2
|
@ -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>
|
Wed May 24 21:59:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* dir.cc (writable_directory): Comment out previous code,
|
* dir.cc (writable_directory): Comment out previous code,
|
||||||
|
|
|
@ -341,7 +341,8 @@ rmdir (const char *dir)
|
||||||
/* Under Windows 9X or on a samba share, ERROR_ACCESS_DENIED is
|
/* 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 file. On 9X the same error is
|
||||||
returned if you try to remove a non-empty directory. */
|
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);
|
set_errno (ENOTDIR);
|
||||||
else if (os_being_run != winNT)
|
else if (os_being_run != winNT)
|
||||||
set_errno (ENOTEMPTY);
|
set_errno (ENOTEMPTY);
|
||||||
|
|
Loading…
Reference in New Issue