diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-03-03 11:34:57 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-03-03 11:34:57 +0000 |
commit | bd731abde1a0daa3ef8b5c3be0eaee8500e66eff (patch) | |
tree | cbf357b674597db4d1a457e1460076a1eb57c32a /Master/texmf/scripts/texdoc/search.tlu | |
parent | f0349288c594eac639eb72d029fb6214a2553145 (diff) |
texdoc 0.71 (bugfix)
git-svn-id: svn://tug.org/texlive/trunk@17300 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts/texdoc/search.tlu')
-rw-r--r-- | Master/texmf/scripts/texdoc/search.tlu | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Master/texmf/scripts/texdoc/search.tlu b/Master/texmf/scripts/texdoc/search.tlu index e336d01ed12..aa225b7fb46 100644 --- a/Master/texmf/scripts/texdoc/search.tlu +++ b/Master/texmf/scripts/texdoc/search.tlu @@ -10,7 +10,7 @@ local L = {} load_env(L, { 'os', 'lfs', 'kpse', 'io', 'setmetatable', 'print', 'dofile', 'loadfile', 'setfenv', 'rawget', 'rawset', - 'win32_hook', 'parse_zip', 'path_parent', + 'parse_zip', 'path_parent', 'get_patterns', 'sort_doclist', 'docfile_quality', 'ext_pos', 'config', }) @@ -31,7 +31,8 @@ doclist = { } The inv subtable is such that for all i -doclist.inv(doclist[i].realpath) == i +doclist.inv(doclist[i].realpath:lower()) == i +Paths are lowercased in order to avoid duplicates on windows. --]] local Doclist = {} @@ -47,13 +48,13 @@ end -- add a docfile to a list function Doclist:add(df) if not df.realpath then return end -- useful if vanilla == false - local index = self.inv[df.realpath] + local index = self.inv[df.realpath:lower()] if index then self[index]:mergein(df) else local newindex = #self + 1 self[newindex] = df - self.inv[df.realpath] = newindex + self.inv[df.realpath:lower()] = newindex end end @@ -241,7 +242,7 @@ end -- return the real path from a texdocs tree number + relative path function texdocs_tree_to_path(tree, rel) - return win32_hook(doc_roots[tree].path..'/'..rel) + return doc_roots[tree].path..'/'..rel end -- find docfiles in texdocs directories @@ -384,7 +385,7 @@ function get_doclist_sty(patlist) local file = kpse.find_file(pat.name) if file then local df = Docfile:new({ - name = win32_hook(file), + name = file, tree = -1, pattern = pat, }) |