Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2004-05

UnixUtil.FNMatch bug

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michalis Kamburelis

Hi

I found some bugs in UnixUtil.FNMatch function. In short, patterns like '*~' matched anything (instead of matching only filenames ending with '~'). I'm attaching patch "unixutil.patch" that fixes these issues. I'm also attaching a test program, "fnmatch_test.pas", so you can see that these bugs really occur and this patch really fixes them. You may want to include this test program somewhere in FPC tests/ dir (tests/test/ ?). This test program is heavily commented, hopefully it explains exactly what bugs were present in FNMatch implementation and why it's OK now.

Note to FPC 1.0.10 users: you can use this patch to fix these issues for FPC 1.0.10 too. You have to apply this to rtl/unix/linux.pp file. Oh, and the test program is usable under FPC 1.0.10 too.

Regards,
Michalis

Reply by email