mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:49:33 +02:00
* Do not allow fileage for directories (15873)
git-svn-id: trunk@17221 -
This commit is contained in:
parent
e8cf8e4177
commit
9747f7f0cd
@ -524,9 +524,9 @@ Function FileAge (Const FileName : String): Longint;
|
||||
Var Info : Stat;
|
||||
|
||||
begin
|
||||
If fpstat (pointer(FileName),Info)<0 then
|
||||
If (fpstat (pointer(FileName),Info)<0) or fpS_ISDIR(info.st_mode) then
|
||||
exit(-1)
|
||||
else
|
||||
else if
|
||||
Result:=UnixToWinAge(info.st_mtime);
|
||||
end;
|
||||
{$endif}
|
||||
|
Loading…
Reference in New Issue
Block a user