From 82d7e009399d95d6265d2641cbc8db55134ae1a4 Mon Sep 17 00:00:00 2001 From: bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Sat, 7 Sep 2013 11:26:20 +0000 Subject: [PATCH] LazFileUtils: use AllowDirectorySeparators instead of hardcode '\' in FilenameIsWinAbsolute(). git-svn-id: trunk@42663 - --- components/lazutils/lazfileutils.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lazutils/lazfileutils.inc b/components/lazutils/lazfileutils.inc index c79062717c..0ebc20a535 100644 --- a/components/lazutils/lazfileutils.inc +++ b/components/lazutils/lazfileutils.inc @@ -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;