[fpc-pascal] findfirst and findnext on non accessible files

Marc Santhoff M.Santhoff at t-online.de
Wed Jun 28 18:30:17 CEST 2006


Am Mittwoch, den 28.06.2006, 15:57 +0200 schrieb Marc Santhoff:
> Am Mittwoch, den 28.06.2006, 11:01 +0200 schrieb Tomas Hajny:
> 
> > Which platform are you talking about, which FindFirst/FindNext
> > (Dos/SysUtils) and what is the behaviour expected from you? E.g. with:
> 
> Sorry, I was too deep into the problem.
> 
> I'm using FreeBSD as main platform for development but for the future at
> least Windows and Linux are targets.

...

> That's a result I'd expect. So I'll go digging for some "Error" or
> "UnixError" variable.

I did and found the implementation of FindFirst/Next on Win32 differing
much from the one in rtl/unix/sysutils.pp. The only system error handled
there is ENOMEM, so the error number on "permission denied" is -1 aka
unknown.

As far as i understand it the function "glob" in
rtl/unix/sysutils.pp:469 is the place where more error handling for this
case should be added. (fpc 2.0.2 release)

Is this assumption correct or am I missing something?

And more: are there other places where handling access rights has to be
handled to stay consistent?

TIA,
Marc





More information about the fpc-pascal mailing list