mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-18 22:44:29 +01:00
fixed compilation error in previous commit
git-svn-id: trunk@10718 -
This commit is contained in:
parent
2e1ff7b684
commit
7847b25113
@ -722,15 +722,15 @@ end;
|
||||
function FileIsExecutable(const AFilename: string): boolean;
|
||||
{$IFNDEF WINDOWS}
|
||||
var
|
||||
Info : Stat
|
||||
Info : Stat;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
Result:=FileExists(AFilename);
|
||||
{$ELSE}
|
||||
// first check AFilename is not a directory and then check if executable
|
||||
Result:= (FpStat(AFilename,st)<>-1) and FPS_ISREG(st.st_mode) and
|
||||
BaseUnix.FpAccess(AFilename,BaseUnix.X_OK)=0;
|
||||
Result:= (FpStat(AFilename,info)<>-1) and FPS_ISREG(info.st_mode) and
|
||||
(BaseUnix.FpAccess(AFilename,BaseUnix.X_OK)=0);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user