codetools: fixed SearchFileInDir and SearchPascalFileInDir searching using Pascal case insensitivity

git-svn-id: trunk@53397 -
This commit is contained in:
mattias 2016-11-21 15:57:00 +00:00
parent b6b7118533
commit 6b7ab7bc9d

View File

@ -1350,7 +1350,8 @@ begin
Result:=FileInfo.Name;
ctsfcAllCase:
if LazFileUtils.CompareFilenamesIgnoreCase(ShortFilename,FileInfo.Name)=0 then begin
// do not use CompareFilenamesIgnoreCase
if CompareText(ShortFilename,FileInfo.Name)=0 then begin
Result:=FileInfo.Name;
if ShortFilename=FileInfo.Name then break;
end;
@ -1561,7 +1562,8 @@ begin
if (FileInfo.Name='.') or (FileInfo.Name='..') or (FileInfo.Name='')
then
continue;
if LazFileUtils.CompareFilenamesIgnoreCase(FileInfo.Name,ShortFile)=0 then begin
if (CompareText(FileInfo.Name,ShortFile)=0)
or (LazFileUtils.CompareFilenamesIgnoreCase(FileInfo.Name,ShortFile)=0) then begin
if FileInfo.Name=ShortFile then begin
// file found, with correct name
Result:=FileInfo.Name;