diff options
-rwxr-xr-x | Master/texmf/scripts/texlive/texdoc.tlu | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Master/texmf/scripts/texlive/texdoc.tlu b/Master/texmf/scripts/texlive/texdoc.tlu index 584f22ce19e..ce1dc1d719e 100755 --- a/Master/texmf/scripts/texlive/texdoc.tlu +++ b/Master/texmf/scripts/texlive/texdoc.tlu @@ -131,13 +131,20 @@ function process_file (file, pathfile, code, pattern) if string.find(pathfile, pattern, 1, no_regex) and is_good_ext (ext) then if base == pattern then - table.insert(exact_docfiles, code..':'..pathfile) + table.insert(exact_docfiles, code_path (code, pathfile)) else - table.insert(rel_docfiles, code..':'..pathfile) + table.insert(rel_docfiles, code_path (code, pathfile)) end end end +-- encodes the base path on two digits and concatenate with filename +-- see real_path() for decoding +function code_path (code, file) + local padding = (code > 9) and '' or '0' + return padding..code..':'..file +end + -- scan a tree function scan_tree (code, path, pattern, recurse) for file in lfs.dir(path) do |