View Issue Details

IDProjectCategoryView StatusLast Update
0037790LazarusPackagespublic2020-11-14 22:23
ReporterCudaText man_ Assigned ToBart Broersma  
Status closedResolutionwon't fix 
OSUbuntu 20 x64 
Product Version2.1 (SVN) 
Summary0037790: FileUtil.FindAllFiles runs forever, because of symlinks

On Ubuntu 20 I enter "folders"="/usr/lib", "masks"="libpython3*".
It runs forever.
Screenshot from debugger added - dir path has REPEATED symlink name added many times.
I will post directory listing to comments.
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


related to 0037792 closedBart Broersma feature req: FileUtil.TFileSearcher excluding file/folder masks 
related to 0037791 closedBart Broersma feature req: FileUtil.TFileSearcher propety MaxDirLevels 


CudaText man_

2020-09-21 16:47


bug-findall.png (182,320 bytes)   
bug-findall.png (182,320 bytes)   

CudaText man_

2020-09-21 16:49

reporter   ~0125728

dir.png (63,608 bytes)   
dir.png (63,608 bytes)   

Bart Broersma

2020-10-10 18:20

developer   ~0126220

Simplest option would be to not follow symlinks (so basically ignore them).
More difficult: get terget of symlink and find out wether or not this will lead to recurrency.

Juha Manninen

2020-10-25 00:59

developer   ~0126526

I feel it goes out of scope of this function. It has already grown too complex IMO.
Specialized components can be provided in external libraries.

Bart Broersma

2020-10-30 15:40

developer   ~0126664

TFileSeracher already has a FollowSymlink property.
This could be added as a default parameter (default = True) to the parameterlist.
It would be the 8th parameter for that function though.

For complex situations it migt be better to either create a TFileSearcher and set it's properties as needed, or write something that is tailor made.

Bart Broersma

2020-11-14 16:54

developer   ~0126932

The parameterlist for FindAllFiles could be expanded at infitum.
It's a simple basic routine, if it does not fit your purpose, then write something tailor made.
(@Alexey: the you in the sentence above is not intended to point at you personally.)

Issue History

Date Modified Username Field Change
2020-09-21 16:47 CudaText man_ New Issue
2020-09-21 16:47 CudaText man_ File Added: bug-findall.png
2020-09-21 16:49 CudaText man_ Note Added: 0125728
2020-09-21 16:49 CudaText man_ File Added: dir.png
2020-09-21 23:19 Bart Broersma Relationship added related to 0037792
2020-10-10 18:20 Bart Broersma Note Added: 0126220
2020-10-25 00:55 Juha Manninen Relationship added related to 0037791
2020-10-25 00:59 Juha Manninen Note Added: 0126526
2020-10-30 15:40 Bart Broersma Note Added: 0126664
2020-11-14 16:54 Bart Broersma Assigned To => Bart Broersma
2020-11-14 16:54 Bart Broersma Status new => resolved
2020-11-14 16:54 Bart Broersma Resolution open => won't fix
2020-11-14 16:54 Bart Broersma LazTarget => -
2020-11-14 16:54 Bart Broersma Widgetset GTK 2 => GTK 2
2020-11-14 16:54 Bart Broersma Note Added: 0126932
2020-11-14 22:23 CudaText man_ Status resolved => closed