PATCH for winsup/dir.cc
Guy Maor
gmaorATwlv.hp.com
Tue Sep 14 11:47:00 GMT 1999
Here is a patch to winsup/dir.cc which fixes rmdir() errno codes on
Win 95/98. It's a pretty straightforward fix.
--- dir.cc.orig Tue Sep 14 11:29:36 1999
+++ dir.cc Tue Aug 31 11:20:26 1999
@@ -331,11 +300,14 @@
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);
+ if you try to remove a file or a non-empty directory. */
+ if (GetFileAttributes (real_dir.get_win32()) != FILE_ATTRIBUTE_DIRECTORY)
+ set_errno (ENOTDIR);
+ else
+ set_errno (ENOTEMPTY);
}
I'm not subscribed to the cygwin list, so please cc me on any replies.
Guy
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list