[Lazarus] Dircleaner example application bug

Howard Page-Clark hdpc at talktalk.net
Thu Jun 10 15:45:34 CEST 2010


On 08/6/10 8:10, Mattias Gaertner wrote:
> 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.

Your improvement fixes that bug, thanks.
However I could not get the confdirs project to compile and run without 
errors on Windows 7 until I commented out

confdirs.lpr line 15	{$R manifest.res}

frmmain.pp line 870	writeln('Adding', Loc[i].Name);

Also the FileActions tabsheet of the main config pagecontrol does not 
work properly. New actions are not shown, or the app crashes if an 
'invisible' (but selected) action is deleted. I see that frmmain.pp line 
990 has this comment in the method ShowFileActionItem(LI: TListItem):

// Bug in control: the items list is cleared!!
// UpdateActionLocations(FLocations);

Is the source of this bug known, and if so is the bug in the bugtracker?

Howard




More information about the Lazarus mailing list