[delphizip] Bug in Match.c

  • From: "Russell Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Sun, 17 Mar 2002 16:37:49 +1100

I am attempting to speedup Match.c and during testing I have discovered a bug 
and some maybe unwanted behaviour.
First the bug
pattern = *.*
will match -
   file.any (correct)
   anypath\anyfile.any (correct) [ all as expected ]
pattern = d*.*
   dfile.any (matches ok)
   anypath\dfile.any (wont match but should)
   danypath\dfile.any (does match but only because first characters match)
   danypath\anythingat.all (does match but should not)

The unusual (but could be handy - I wanted zip to do it)
you can have wildcards in path segments
ie
path\any*\thisfile.txt
will extract "thisfile.txt" from any subdirectory of path beginning with 'any' 
ie matches path\any\thisfile.txt
    not path\no\thisfile.txt

I am rewriting match to speed it up (and correct it) but now have start again 
to keep this behaviour (unless too many objections)
- Russell Peters

Other related posts:

  • » [delphizip] Bug in Match.c