Mail Archives: cygwin-developers/1998/09/10/01:22:29
Thanks, this patch has been applied...
-gjn
On Sun, Aug 16, 1998 at 07:44:16PM +1000, Trevor Yann wrote:
>
> An attempt to remove a non-empty directory is reported differently under NT
> than it is under Windows 95/98. NT correctly returns the error
> DIR_NOT_EMPTY, but both Windows 95 and Windows 98 return
> ERROR_ACCESS_DENIED. This fix allows a correct error code to be returned.
>
> dir.cc (rmdir): return correct error code when attempting to remove a
> non-empty directory under windows 95/98
>
> diff -ur winsup.original/dir.cc winsup/dir.cc
> --- winsup.original/dir.cc Tue Jun 02 04:21:12 1998
> +++ winsup/dir.cc Fri Aug 14 22:27:56 1998
> @@ -294,6 +294,12 @@
>
> if (RemoveDirectoryA (real_dir.get_win32 ()))
> res = 0;
> + else if (os_being_run != winNT && GetLastError() == ERROR_ACCESS_DENIED)
> + {
> + /* Under Windows 95 & 98, ERROR_ACCESS_DENIED is returned
> + if you try to remove a directory that is not empty. */
> + set_errno (ENOTEMPTY);
> + }
> else
> __seterrno ();
>
--
Geoffrey Noer
noer AT cygnus DOT com
- Raw text -