Hi,
when I try to use getlastoserror something "funny" happens.
We're dealing with:
$ ll /home/marc/program/Test_C/unreadable/
ls: : Permission deniedThe source:
tmp := aFile^ + '/' + dirrec.Name;
writeln('file: '+ tmp );
n := fpaccess(tmp , R_OK);
writeln(n);
n := getlastoserror;
writeln(n);The output:
file: /home/marc/program/Test_C/unreadable/
-1
-65523
If I do this:
program stat;
uses baseunix,errors,sysutils;
var
st: baseunix.stat;
res: integer;
begin
//res := fpstat('/home/marc/program/Test_C/unreadable/', st);
res := fpaccess('/home/marc/program/Test_C/unreadable/', R_OK);
writeln(res);
res := getlastoserror;
writeln(res);
end.The result is correct:
$ ./stat
-1
13
and shows ESysEACCES as error number.
How can that happen?
Marc
