IDE: fixed searching Pascal files case insensitive

git-svn-id: branches/fixes_1_6@53409 -
This commit is contained in:
mattias 2016-11-21 16:20:04 +00:00
parent f5e60a47fd
commit 230898b8ec
2 changed files with 4 additions and 4 deletions

View File

@ -330,7 +330,7 @@ end;
function FindFilesCaseInsensitive(const Directory,
CaseInsensitiveFilename: string; IgnoreExact: boolean): TStringLists;
Search case insensitive in Directory for all files
Search Pascal case insensitive in Directory for all files
named CaseInsensitiveFilename
-------------------------------------------------------------------------------}
function FindFilesCaseInsensitive(const Directory,
@ -346,7 +346,7 @@ begin
// check if special file
if (FileInfo.Name='.') or (FileInfo.Name='..') or (FileInfo.Name='') then
continue;
if (CompareFilenamesIgnoreCase(CaseInsensitiveFilename,FileInfo.Name)=0)
if (CompareText(CaseInsensitiveFilename,FileInfo.Name)=0) // Pascal insensitibity, not UTF-8, thing about Turkish I
and ((not IgnoreExact)
or (CompareFilenames(CaseInsensitiveFilename,FileInfo.Name)<>0))
then begin

View File

@ -5454,8 +5454,8 @@ var
AFileName:=ExtractFilename(AFileName);
if siffCaseSensitive in SearchFlags then
Result:=SearchedFilename=AFilename
else
Result:=CompareFilenamesIgnoreCase(SearchedFilename,AFilename)=0;
else // check Pascal case insensitivity (CompareText, do not use CompareFilenamesIgnoreCase, because of Turkish I)
Result:=CompareText(SearchedFilename,AFilename)=0;
end;
begin