diff options
author | Norbert Preining <norbert@preining.info> | 2021-05-21 03:01:23 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-05-21 03:01:23 +0000 |
commit | 6a52d8839d334ac56f36195aa404fac667862830 (patch) | |
tree | 826593c6af503aaaf2691f8e96912485428ef595 /support/texdoc/script | |
parent | 6d6c3b4ee419b9f485a213d2ece28b06e9ca2f7c (diff) |
CTAN sync 202105210301
Diffstat (limited to 'support/texdoc/script')
-rw-r--r-- | support/texdoc/script/texdoclib-const.tlu | 4 | ||||
-rw-r--r-- | support/texdoc/script/texdoclib-score.tlu | 6 | ||||
-rw-r--r-- | support/texdoc/script/texdoclib-search.tlu | 19 |
3 files changed, 21 insertions, 8 deletions
diff --git a/support/texdoc/script/texdoclib-const.tlu b/support/texdoc/script/texdoclib-const.tlu index aef88a0623..7da64d394b 100644 --- a/support/texdoc/script/texdoclib-const.tlu +++ b/support/texdoc/script/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/support/texdoc/script/texdoclib-score.tlu b/support/texdoc/script/texdoclib-score.tlu index fdc2ef3467..01c3818e37 100644 --- a/support/texdoc/script/texdoclib-score.tlu +++ b/support/texdoc/script/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/support/texdoc/script/texdoclib-search.tlu b/support/texdoc/script/texdoclib-search.tlu index 8718dc83ff..af04a2a3ee 100644 --- a/support/texdoc/script/texdoclib-search.tlu +++ b/support/texdoc/script/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 |