[fpc-pascal] RE: findfirst and findnext on non accessible files
XHajT03 at mbox.vol.cz
Thu Jun 29 09:50:57 CEST 2006
Marco van de Voort wrote:
>> On 28 Jun 06, at 23:41, Marc Santhoff wrote:
>> > Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer:
>> > What I don't understand is why the var "errno" is not set or it's
>> > is destroyed before Findfirst/-Next return. Does this value has to be
>> > set explicitely by using fpseterrno()? It returns always -1 in case of
>> > permission denied.
>> My opinion is that SysUtils.FindFirst should
>> return 5 in case of an error; "errno" is not
>> portable, whereas SysUtils is supposed to support
>> portable code.
> (that is not really the problem, OS errorcodes can be hauled with
> getlastoserror, which is errno on *nix)
Well, it is a problem, because not returning the error code directly in
return value violates SysUtils.FindFirst specification and most probably
Delphi compatibility too.
More information about the fpc-pascal