[yunqa.de] TDIWildFileFinder not matching wildcard patterns

  • From: Marek Jedlinski <marek@xxxxxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Mon, 22 Dec 2008 04:16:03 +0100

I may have found a problem with TDIWildFileFinder:

When a simple wildcard pattern is specified such as '*.ext', the correct
files are listed. However, when trying to use a more precise pattern,
TDIWildFileFinder fails to locate any of the matching files.

For example, these patterns fail to locate any files at all:

abc.*
a*.*
a*.txt
abc.txt (file is not found even when fully specified)

In general, TDIWildFileFinder fails if any part of the filename portion is
specified in the wildcard pattern. It works only if the filename portion is
an asterisk. Indeed, if a file named 'abc.txt' exists, and the full filename is
specified exactly as the wildcard pattern, the file is not found.

The same occurs when using the '?' wildcard in the filename portion: for
the above example, only '*.???' works. However, '???.txt' fails to locate
the file.

The same problem occurs in the DIFileFinder_Main.dpr demo.

Is this by design? I can use the RegEx variant as a quick substitute, but
it's not always suitable for end users.

Thank you, and very best regards,
Marek



--
No ads, no nags freeware: http://www.tranglos.com
Skype: tranglos   GG: 5967086
alt. e-mail: marek.jedlinski(at)gmail.com


_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: