Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com To: cygwin AT sourceware DOT cygnus DOT com Subject: PATCH for winsup/dir.cc From: Guy Maor Date: 14 Sep 1999 11:40:04 -0700 Message-ID: Lines: 21 User-Agent: Gnus/5.070092 (Pterodactyl Gnus v0.92) XEmacs/20.4 (Emerald) Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 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 AT sourceware DOT cygnus DOT com