El 24/02/2021 a las 22:36, Bart via lazarus escribió:
Filename:='test.txt'
Mask:='test??.txt?'
Match must be true
That sucks big time.
A ? is supposed to match EXACTLY 1 character (not optional).
Bloody @#$%$#@#$ Micro$uck,
X-D
This quirk has its explanation which is 8.3 backwards compatibility. The
old 8.3 masking (well the system itself) resolves masks setting the name
and extension in a 11 bytes array where space is a "no-char", so file
name "TEST.TXT" is stored as "TEXT " and "TXT" and if you apply this
mask "TEST????.TXT" its logical that it evaluates to a positive match.
I'm quite sure that this comes from CP/M times.
Have a nice day.
--
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus