mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 08:49:25 +02:00
* Avoid doing a syscall with a nil parameter in fileexists
git-svn-id: trunk@44090 -
This commit is contained in:
parent
99e5ae2804
commit
e7f5b89c2c
@ -662,6 +662,9 @@ var
|
|||||||
SystemFileName: RawByteString;
|
SystemFileName: RawByteString;
|
||||||
isdir: Boolean;
|
isdir: Boolean;
|
||||||
begin
|
begin
|
||||||
|
// Do not call fpAccess with an empty name. (Valgrind will complain)
|
||||||
|
if Filename='' then
|
||||||
|
Exit(False);
|
||||||
SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
|
SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
|
||||||
// Don't use stat. It fails on files >2 GB.
|
// Don't use stat. It fails on files >2 GB.
|
||||||
// Access obeys the same access rules, so the result should be the same.
|
// Access obeys the same access rules, so the result should be the same.
|
||||||
|
Loading…
Reference in New Issue
Block a user