LazUtils: Masks: fix TWindowsMaskUtf8.Matches not calling Compile.

Now all tests in the testsuite are OK again.
This commit is contained in:
Bart 2021-11-03 20:04:35 +01:00
parent aa74cc8211
commit 2ce594217a

View File

@ -1367,7 +1367,7 @@ begin
if wqNoExtension in fWindowsQuirkAllowed then begin
if Length(lExtensionMask)=1 then begin
fWindowsQuirkInUse:=[wqNoExtension];
fWindowsQuirkInUse:=fWindowsQuirkInUse+[wqNoExtension];
lExtensionMask:='';
end;
end;
@ -1380,6 +1380,8 @@ function TWindowsMaskUTF8.Matches(const aFileName: String): Boolean;
var
lFileName, lExtension: String;
begin
if not fMaskIsCompiled then
Compile;
if wqNoExtension in fWindowsQuirkInUse then begin
SplitFileNameExtension(aFileName,lFileName,lExtension,false);
// wqNoExtension = Empty extension