On Wednesday, 5 June 2019 10.55.11 WEST Jean-Marc Lasgouttes wrote: > > --- lyxgit/lib/scripts/TeXFiles.py 2019-05-31 16:27:47.000000000 > > +0200 > > +++ lyxgit/lib/scripts/TeXFiles.py 2019-05-29 10:38:25.000000000 > > +0200 > > @@ -116,7 +116,7 @@ > > if not os.path.isdir(dir): > > continue > > # walk down the file hierarchy > > - for root,path,files in os.walk(dir): > > + for root,path,files in os.walk(dir, followlinks=True): > > # check file type > > for file in files: > > if len(file) > 4 and file[-4:] == file_ext: > > > > I hope this change can be considered for inclusion in a future LyX > > version. > > > > Regards, > > Michael
The problem with this approach is the same problem that we have when traversing a path following links. We need to ensure that we do not get into a cyclic graph or else the program will enter an infinite cycle. From the python documentation: https://docs.python.org/3/library/os.html#os.walk Note Be aware that setting followlinks to True can lead to infinite recursion if a link points to a parent directory of itself. walk() does not keep track of the directories it visited already. -- José Abílio