mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 00:20:13 +02:00
LazFileUtils: use AllowDirectorySeparators instead of hardcode '\' in FilenameIsWinAbsolute().
git-svn-id: trunk@42663 -
This commit is contained in:
parent
2139b17c5c
commit
82d7e00939
@ -144,11 +144,11 @@ end;
|
||||
function FilenameIsWinAbsolute(const TheFilename: string): boolean;
|
||||
begin
|
||||
{$ifdef wince}
|
||||
Result := (Length(TheFilename) > 0) and (TheFilename[1] = '\');
|
||||
Result := (Length(TheFilename) > 0) and (TheFilename[1] in AllowDirectorySeparators);
|
||||
{$else wince}
|
||||
Result:=((length(TheFilename)>=3) and
|
||||
(TheFilename[1] in ['A'..'Z','a'..'z']) and (TheFilename[2]=':') and (TheFilename[3]='\'))
|
||||
or ((length(TheFilename)>=2) and (TheFilename[1]='\') and (TheFilename[2]='\'))
|
||||
(TheFilename[1] in ['A'..'Z','a'..'z']) and (TheFilename[2]=':') and (TheFilename[3]in AllowDirectorySeparators))
|
||||
or ((length(TheFilename)>=2) and (TheFilename[1] in AllowDirectorySeparators) and (TheFilename[2] in AllowDirectorySeparators))
|
||||
;
|
||||
{$endif wince}
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user