mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 23:46:00 +02:00
* statx based Sysutils.FileGetDate with handle fixed
+ test git-svn-id: trunk@48520 -
This commit is contained in:
parent
b08717fef6
commit
3e453f92fc
@ -1082,10 +1082,12 @@ Var
|
||||
{$ifdef USE_STATX}
|
||||
Infox : TStatx;
|
||||
{$endif USE_STATX}
|
||||
Char0 : char;
|
||||
begin
|
||||
Result:=-1;
|
||||
{$ifdef USE_STATX}
|
||||
if statx(Handle,nil,0,STATX_MTIME,Infox)=0 then
|
||||
Char0:=#0;
|
||||
if statx(Handle,@Char0,AT_EMPTY_PATH,STATX_MTIME,Infox)=0 then
|
||||
Result:=Infox.stx_Mtime.tv_sec
|
||||
else if fpgeterrno=ESysENOSYS then
|
||||
{$endif USE_STATX}
|
||||
|
@ -39,6 +39,12 @@ BEGIN
|
||||
do_error(1003);
|
||||
Close(f);
|
||||
|
||||
Assign(f,'datetest.dat');
|
||||
Reset(f);
|
||||
if FileGetDate(filerec(f).handle)<>DateTimeToFileDate(dateTime) then
|
||||
do_error(1004);
|
||||
Close(f);
|
||||
|
||||
if FileExists('datetest.dat') then
|
||||
begin
|
||||
Assign(f,'datetest.dat');
|
||||
|
Loading…
Reference in New Issue
Block a user