mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 12:19:18 +02:00
Don’t crash on empty path.
This commit is contained in:
parent
07f9113a7c
commit
88ca756f19
@ -962,6 +962,8 @@ begin
|
|||||||
Result := '';
|
Result := '';
|
||||||
for Path in Paths do
|
for Path in Paths do
|
||||||
begin
|
begin
|
||||||
|
if Path = '' then
|
||||||
|
continue;
|
||||||
if ValidateParams and not TPath.HasValidPathChars(Path, False) then
|
if ValidateParams and not TPath.HasValidPathChars(Path, False) then
|
||||||
Raise EInOutArgumentException.CreateFmt(SErrInvalidCharsInPath,[Path],Path);
|
Raise EInOutArgumentException.CreateFmt(SErrInvalidCharsInPath,[Path],Path);
|
||||||
{$ifdef mswindows}
|
{$ifdef mswindows}
|
||||||
|
Loading…
Reference in New Issue
Block a user