| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Date: | Fri, 10 May 2002 13:55:43 -0400 (EDT) |
| From: | Mark Blackburn <marklist AT rivendell DOT fangorn DOT ca> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: EISDIR EACCES and open in grep |
| Message-ID: | <Pine.LNX.3.96.1020510134922.30004A-100000@rivendell.fangorn.ca> |
| MIME-Version: | 1.0 |
Well so far I have two solutions to this recursive grep on Windows 98
problem:
1) The patch I submitted earlier here it is again relative to the 1.3.10-1
version of cygwin:
--- fhandler.cc.bak Tue Feb 19 22:25:00 2002
+++ fhandler.cc Thu May 9 10:18:40 2002
@@ -409,7 +409,26 @@
if (GetLastError () == ERROR_INVALID_HANDLE)
set_errno (ENOENT);
else
- __seterrno ();
+ {
+ if (GetLastError () == ERROR_ACCESS_DENIED)
+ {
+ WIN32_FIND_DATA find_file_data;
+ if (INVALID_HANDLE_VALUE != FindFirstFile(get_win32_name (),
+ &find_file_data))
+ {
+ if (FILE_ATTRIBUTE_DIRECTORY ==
+ find_file_data.dwFileAttributes)
+ set_errno (EISDIR);
+ }
+ else
+ {
+ SetLastError (ERROR_ACCESS_DENIED);
+ __seterrno ();
+ }
+ }
+ else
+ __seterrno ();
+ }
goto done;
}
OR
2) Compile grep with the HAVE_DIR_EACCES_BUG flag enabled.
I've tested these both on Windows 98. I have no idea what these changes
would do to NT/2000 however.
BTW: thanks to Chris Faylor for helping with the cygwin1.dll compile
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |