mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 12:39:24 +02:00
* use AllowDirectorySeparators, instead of checking for '/' and '\'
This commit is contained in:
parent
60d350f067
commit
a0e7882692
@ -156,7 +156,7 @@ begin
|
|||||||
if Copy(path,1,Length(pdir))<>pdir then
|
if Copy(path,1,Length(pdir))<>pdir then
|
||||||
continue;
|
continue;
|
||||||
chridx:=Length(pdir)+1;
|
chridx:=Length(pdir)+1;
|
||||||
if ((pdir<>'/') and (pdir<>'\')) and
|
if ((Length(pdir)<>1) or ((Length(pdir)=1) and not (pdir[1] in AllowDirectorySeparators))) and
|
||||||
((chridx>Length(path)) or not (path[chridx] in AllowDirectorySeparators)) then
|
((chridx>Length(path)) or not (path[chridx] in AllowDirectorySeparators)) then
|
||||||
continue;
|
continue;
|
||||||
if Length(pdir)>longest_match then
|
if Length(pdir)>longest_match then
|
||||||
|
Loading…
Reference in New Issue
Block a user