Browse Source

Don’t crash on empty path.

Rika Ichinose 11 months ago
parent
commit
88ca756f19
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/vcl-compat/src/system.ioutils.pp

+ 2 - 0
packages/vcl-compat/src/system.ioutils.pp

@@ -962,6 +962,8 @@ begin
   Result := '';
   for Path in Paths do
   begin
+    if Path = '' then
+      continue;
     if ValidateParams and not TPath.HasValidPathChars(Path, False) then
       Raise EInOutArgumentException.CreateFmt(SErrInvalidCharsInPath,[Path],Path);
   {$ifdef mswindows}