Am Tue, 31 May 2022 12:20:55 +0200 schrieb Kornel Benko <kor...@lyx.org>:
> At least here is what I can see: > > $ wc styFiles.lst > 11429 11429 812660 styFiles.lst > $ sort styFiles.lst | uniq| wc > 5943 5943 422983 > > Kornel Attached patch fixes it. OK to commit? Kornel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
diff --git a/lib/scripts/TeXFiles.py b/lib/scripts/TeXFiles.py index 16b7df2e8b..3a3ee13477 100755 --- a/lib/scripts/TeXFiles.py +++ b/lib/scripts/TeXFiles.py @@ -109,10 +109,11 @@ for type in types: # remove excessive // dirs = re.sub('//+', '/', dirs) file_ext = '.' + type out = open(outfile, 'w') + rootmap = dict() for dir in dirs.split(path_sep): # for each valid directory if not os.path.isdir(dir): continue # walk down the file hierarchy @@ -127,10 +128,14 @@ for type in types: if dirname not in visited: visited.add(dirname) recurse.append(dir) dirs[:] = recurse # check file type + if root in rootmap: + continue + else: + rootmap[root] = 1 for file in files: if len(file) > 4 and file[-4:] == file_ext: # force the use of / since miktex uses / even under windows print(root.replace('\\', '/') + '/' + file, file=out) out.close()
pgpRkdJaz6stT.pgp
Description: Digitale Signatur von OpenPGP
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel