[Lazarus] MatchesWindowsMask('[x]','[x]') return False

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Mar 15 20:23:11 CET 2020

On Sun, 15 Mar 2020 13:09:55 +0100
Rolf Wetjen via lazarus <lazarus at lists.lazarus-ide.org> wrote:

> Hi Lazarus team,
> I found this during some error analysis. TMask uses the brackets as a 
> set indicatior in the mask string. In this case the FMask.MinLength
> and FMask.MaxLength are set to 1. The brackets in the test string are
> not treated in any special way and so the match fails as the length
> of the test string is 3 (tested inside TMask.Matches).
> I think that this isn't the expected behavior especially as [ and ]
> are regular character for file and path names in windows.

IMO it should check for \[


More information about the lazarus mailing list