Request for modification of FileUtil.pas (TListFileSearcher.DoFileFound and TListDirectoriesSearcher.DoDirectoryFound)
Original Reporter info from Mantis: devEric69
-
Reporter name: devEric69
Original Reporter info from Mantis: devEric69
- Reporter name: devEric69
Description:
Well, when TListFileSearcher.DoFileFound or TListDirectoriesSearcher.DoDirectoryFound "matches", I \ we know that the current field named FileName that has passed the filtering of the search mask (glob regex of the FileName), and the filtering of the possible attributes of the file (hidden or not, system or not, ...). The field named FileName is therefore a file or a directory that interests me \ us, and that I \ we add to the FList. But, I find that the event associated with each correspondence (a file or a directory), missed to be pulled to take advantage of the inheritance. So, I propose to add 2 lines (Cf. // ++):
procedure TListFileSearcher.DoFileFound;
begin
inherited DoFileFound; // ++
FList.Add(FileName);
end;
procedure TListDirectoriesSearcher.DoDirectoryFound;
begin
inherited DoDirectoryFound; // ++
FDirectoriesList.Add(FileName);
end;
Mantis conversion info:
- Mantis ID: 38091
- Version: 2.3 (SVN)
- Fixed in revision: r64355 (#7ba0f775)