codetools: fixed FilenameIsMatching on Windows

This commit is contained in:
mattias 2023-08-06 09:46:49 +02:00
parent 478b6dcf4b
commit f03d205c06

View File

@ -1383,10 +1383,14 @@ function FilenameIsMatching(const Mask, Filename: string;
case MaskP^ of
#0,SpecialChar,PathDelim,'?','*','{',',','}': break;
'a'..'z','A'..'Z':
{$IFDEF CaseInsensitiveFilenames}
if FPUpChars[MaskP^]<>FPUpChars[FileP^] then exit;
{$ELSE}
if AnyCase then begin
if FPUpChars[MaskP^]<>FPUpChars[FileP^] then exit;
end else
if MaskP^<>FileP^ then exit;
{$ENDIF}
else
if MaskP^<>FileP^ then exit;
end;