[Lazarus] Dircleaner example application bug
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Jun 8 09:10:50 CEST 2010
On Mon, 07 Jun 2010 23:54:22 +0100
Howard Page-Clark <hdpc at talktalk.net> wrote:
> There is a minor bug in the very useful example application dircleaner.
> The unit dircleaner.pp around line 441 has
>
> FileNameFits:=Pos(Ext,FWorkExt)<>0;
>
> to check if the current file under consideration fits the specified file
> extension.
>
> This test is too simple since it does not look for an exact match.
> Suppose FWorkExt contains 'PPU' and the current file extension is 'PP'.
>
> The program will delete all the .pp files it finds, as well as all the
> .ppu ones. The test has to be stricter.
I improved it. Please test.
Mattias
More information about the Lazarus
mailing list