diff options
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/texdoc/texdoclib-const.tlu | 4 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texdoc/texdoclib-score.tlu | 6 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/texdoc/texdoclib-search.tlu | 19 |
3 files changed, 21 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/texdoc/texdoclib-const.tlu b/Master/texmf-dist/scripts/texdoc/texdoclib-const.tlu index aef88a06237..7da64d394bb 100755 --- a/Master/texmf-dist/scripts/texdoc/texdoclib-const.tlu +++ b/Master/texmf-dist/scripts/texdoc/texdoclib-const.tlu @@ -22,8 +22,8 @@ end -- progname and version fullname = kpse.find_file('texdoc/texdoclib', 'lua') progname = 'Texdoc' -version = '3.3' -release_date = '2021-03-17' +version = '3.3.1' +release_date = '2021-05-20' -- make sure to update setup_config_from_cl() accordingly -- and set a default value in setup_config_from_defaults() if relevant diff --git a/Master/texmf-dist/scripts/texdoc/texdoclib-score.tlu b/Master/texmf-dist/scripts/texdoc/texdoclib-score.tlu index fdc2ef3467f..01c3818e375 100755 --- a/Master/texmf-dist/scripts/texdoc/texdoclib-score.tlu +++ b/Master/texmf-dist/scripts/texdoc/texdoclib-score.tlu @@ -250,7 +250,7 @@ end -- compare two docfile's: (see texdoclib-search.tlu for structure) -- 1. by score -- 2. then by extensions (ordered as in ext_list), --- 3. then lexicographically by fullpath. +-- 3. then lexicographically by normname. -- 4. then by tree. -- return true if a is better than b local function docfile_order(a, b) @@ -258,8 +258,8 @@ local function docfile_order(a, b) elseif a.score < b.score then return false elseif a.ext_pos < b.ext_pos then return true elseif a.ext_pos > b.ext_pos then return false - elseif a.realpath < b.realpath then return true - elseif a.realpath > b.realpath then return false + elseif a.normname < b.normname then return true + elseif a.normname > b.normname then return false else return (a.tree > b.tree) end end diff --git a/Master/texmf-dist/scripts/texdoc/texdoclib-search.tlu b/Master/texmf-dist/scripts/texdoc/texdoclib-search.tlu index 8718dc83fff..af04a2a3eec 100755 --- a/Master/texmf-dist/scripts/texdoc/texdoclib-search.tlu +++ b/Master/texmf-dist/scripts/texdoc/texdoclib-search.tlu @@ -453,13 +453,21 @@ end -- make sure a given directory exists, or return nil plus an error string local function mkdir_p(dir) - if lfs.isdir(dir) then return true end + if os.type == 'windows' and chgstrcp then + if lfs.isdir(chgstrcp.syscptoutf8(dir)) then return true end + else + if lfs.isdir(dir) then return true end + end local parent = texdoc.util.path_parent(dir) if parent then local ok, msg = mkdir_p(parent) if not ok then return nil, msg end end - return lfs.mkdir(dir) + if os.type == 'windows' and chgstrcp then + return lfs.mkdir(chgstrcp.syscptoutf8(dir)) + else + return lfs.mkdir(dir) + end end local print_out_tlpinfo, get_doclist_tlpdb @@ -538,7 +546,12 @@ end -- print out data from tlpdb in dofile()-able form print_out_tlpinfo = function(filename) - local fh = assert(io.open(filename, 'w')) + local fh + if os.type == 'windows' and chgstrcp then + fh = assert(io.open(chgstrcp.syscptoutf8(filename), 'w')) + else + fh = assert(io.open(filename, 'w')) + end local function printf(s, ...) fh:write(string.format(s, ...)) end -- s_meta |